-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #769 from Mavennet/feat/addExternalIdentifier
- Loading branch information
Showing
4 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
$linkedData: | ||
term: Thing | ||
'@id': https://schema.org/Thing | ||
title: Thing | ||
description: The most generic type of item. | ||
type: object | ||
properties: | ||
type: | ||
type: array | ||
readOnly: true | ||
const: | ||
- Thing | ||
default: | ||
- Thing | ||
items: | ||
type: string | ||
enum: | ||
- Thing | ||
identifier: | ||
description: The identifier property represents any kind of identifier for any kind of Thing, such as ISBNs, GTIN codes, UUIDs, etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See background notes for more details. | ||
type: string | ||
$linkedData: | ||
term: uri | ||
'@id': https://schema.org/identifier | ||
name: | ||
title: Name | ||
description: The name of the item. | ||
type: string | ||
$linkedData: | ||
term: uri | ||
'@id': https://schema.org/name | ||
additionalProperties: true | ||
required: | ||
- type | ||
example: |- | ||
{ | ||
"type": [ | ||
"Thing" | ||
], | ||
"identifier": "123", | ||
"name": "entrySummaryId" | ||
} |
110 changes: 110 additions & 0 deletions
110
docs/openapi/components/schemas/credentials/ThingCredential.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
$linkedData: | ||
term: ThingCredential | ||
'@id': https://w3id.org/traceability#ThingCredential | ||
title: Thing Credential | ||
tags: | ||
- Steel | ||
- eCommerce | ||
- Agriculture | ||
- Oil and Gas | ||
- Other | ||
description: A credential that contains a thing. | ||
type: object | ||
properties: | ||
'@context': | ||
type: array | ||
readOnly: true | ||
const: | ||
- https://www.w3.org/2018/credentials/v1 | ||
- https://w3id.org/traceability/v1 | ||
default: | ||
- https://www.w3.org/2018/credentials/v1 | ||
- https://w3id.org/traceability/v1 | ||
items: | ||
type: string | ||
enum: | ||
- https://www.w3.org/2018/credentials/v1 | ||
- https://w3id.org/traceability/v1 | ||
type: | ||
type: array | ||
readOnly: true | ||
const: | ||
- VerifiableCredential | ||
- ThingCredential | ||
default: | ||
- VerifiableCredential | ||
- ThingCredential | ||
items: | ||
type: string | ||
enum: | ||
- VerifiableCredential | ||
- ThingCredential | ||
id: | ||
type: string | ||
name: | ||
type: string | ||
description: | ||
type: string | ||
issuanceDate: | ||
type: string | ||
expirationDate: | ||
type: string | ||
issuer: | ||
$ref: ../common/Organization.yml | ||
credentialSchema: | ||
type: object | ||
properties: | ||
id: | ||
title: Id | ||
description: The url of the schema file to validate the shape of the json object | ||
type: string | ||
format: uri | ||
example: https://w3id.org/traceability/openapi/components/schemas/credentials/ThingCredential.yml | ||
type: | ||
title: Type | ||
description: The type of validation to be run against the defined schema | ||
const: OpenApiSpecificationValidator2022 | ||
credentialSubject: | ||
$ref: ../common/Thing.yml | ||
proof: | ||
$ref: ../snippets/proof.yml | ||
additionalProperties: false | ||
required: | ||
- '@context' | ||
- type | ||
- issuanceDate | ||
- issuer | ||
- credentialSubject | ||
example: |- | ||
{ | ||
"@context": [ | ||
"https://www.w3.org/2018/credentials/v1", | ||
"https://w3id.org/traceability/v1" | ||
], | ||
"id": "http://example.com/dd0c6f9a-5df6-40a3-bb34-863cd1fda606", | ||
"type": [ | ||
"VerifiableCredential", | ||
"ThingCredential" | ||
], | ||
"issuer": { | ||
"type": [ | ||
"Organization" | ||
], | ||
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U" | ||
}, | ||
"issuanceDate": "2022-11-01T10:58:45-04:00", | ||
"credentialSubject": { | ||
"type": [ | ||
"Thing" | ||
], | ||
"identifier": "123", | ||
"name": "entrySummaryId" | ||
}, | ||
"proof": { | ||
"type": "Ed25519Signature2018", | ||
"created": "2023-05-11T18:15:29Z", | ||
"verificationMethod": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U#z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U", | ||
"proofPurpose": "assertionMethod", | ||
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..-XauuCyKOfCH9RTOc3B8003PQI_oAHwb9UCr26L7COA5kDLdnXzFmgKpiy6v4xd39j-kCbRqlAmTl_fO-4ZYBw" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters