Skip to content

Commit

Permalink
fix: did:web only, spec compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
Nis Jespersen committed Apr 24, 2024
1 parent 92b8cbf commit f143a6f
Show file tree
Hide file tree
Showing 76 changed files with 92 additions and 99 deletions.
7 changes: 0 additions & 7 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,3 @@ The scripts which produce this document are described as follows.
1. `schemas-to-openapi.js` builds the YAML (`.yml`) file for the [OpenAPI Spec](https://w3c-ccg.github.io/traceability-vocab/openapi/)
2. `openapi-to-context.js` builds the JSON-LD context from the OpenAPI spec which is written to `/docs/contexts/traceability-v1.jsonld`
3. `schemas-to-vocab.js` builds the HTML (`.html`) files for the schemas which are referenced from `/docs/index.html` in the spec

## Generating Proofs

New credentials can be added to the vocabulary by adding a new file inside `/docs/openapi/components/schemas/credentials/`
with issuer `did:key:z6MktiSzqF9kqwdU8VkdBKx56EYzXfpgnNPUAGznpicNiWfn`. From there you can go to the
`/packages/traceability-schemas/scripts/` directory and run `node regenerate.js`. This will generate a proof for credentials
without a proof, or fail to validate because of a broken proof.
2 changes: 1 addition & 1 deletion docs/openapi/components/schemas/common/BankAccount.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ example: |-
"BIC11": "TDOMCATTTOR",
"familyName": "Smith",
"givenName": "Alice",
"id": "did:key:z6Mk2cd21e9abe57fae7f62cf07e7be5931073da1b522790e63834fe17a4c2be",
"id": "did:web:organization.example.com",
"iban": "GB74GSLD04296280001319",
"routingInfo": {
"type": ["RoutingInfo"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ example: |-
],
"carrier": {
"type": ["Organization"],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"name": "World Forward, Inc.",
"location": {
"type": ["Place"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,5 @@ example: |-
"name": "Lawn Flamingos",
"description": "Classic plastic lawn flamingos, 2pcs"
},
"extendsCredential": "did:key:z6LSpdSReUHCjYcQb1243aF1vS7sd9ArK585Mm4ktARQxatd"
"extendsCredential": "did:web:organization.example.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ example: |-
],
"carrier": {
"type": ["Organization"],
"id": "did:key:z6Mku6sNEit2qhNyaKDoj6ozURx5ApD85Za5g6dmnpYi6Auv",
"id": "did:web:organization.example.com",
"name": "MULTI CONTAINER LINE",
"location": {
"type": ["Place"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ example: |-
],
"carrier": {
"type": ["Organization"],
"id": "did:key:z6Mku6sNEit2qhNyaKDoj6ozURx5ApD85Za5g6dmnpYi6Auv",
"id": "did:web:organization.example.com",
"name": "MULTI CONTAINER LINE",
"location": {
"type": ["Place"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ example: |-
],
"carrier": {
"type": ["Organization"],
"id": "did:key:z6Mku6sNEit2qhNyaKDoj6ozURx5ApD85Za5g6dmnpYi6Auv",
"id": "did:web:organization.example.com",
"name": "MULTI CONTAINER LINE",
"location": {
"type": ["Place"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ example: |-
"certificationType": "Positive",
"certifierDetails": {
"type": ["Organization"],
"id": "did:key:z6MkjR12D3456sn2yBAyqj5gqckDjvyAbNSusehsxtkvknfa",
"id": "did:web:organization.example.com",
"name": "Chemical Import Co",
"description": "Specialist in importing and distributing chemical products",
"location": {
Expand Down
2 changes: 1 addition & 1 deletion docs/openapi/components/schemas/common/Template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ example: |-
],
"issuanceDate": "2019-12-11T03:50:55Z",
"issuer": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"type": ["Organization"],
"name": "Hauck Group",
"description": "Focused secondary synergy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ example: |-
],
"carrier": {
"type": ["Organization"],
"id": "did:key:z6Mku6sNEit2qhNyaKDoj6ozURx5ApD85Za5g6dmnpYi6Auv",
"id": "did:web:organization.example.com",
"name": "MULTI CONTAINER LINE",
"location": {
"type": ["Place"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ example: |-
},
"issuanceDate": "2023-05-21T15:39:57.944Z",
"issuer": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U"
"id": "did:web:organization.example.com"
},
"credentialSubject": {
"type": [
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ example: |-
"type": [
"Organization"
],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"name": "Carrior Goods And More"
},
"credentialSubject": {
Expand All @@ -110,7 +110,7 @@ example: |-
"billOfLadingNumber": "991205182A",
"bookingNumber": "991205182",
"carrier": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"type": [
"Organization"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ example: |-
],
"issuanceDate": "2022-02-25T14:34:00Z",
"issuer": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"type": [
"Organization"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ example: |-
"type": [
"Organization"
],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"name": "Future Mobility, Inc.",
"location": {
"type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ example: |-
],
"issuanceDate": "2022-02-25T14:34:00Z",
"issuer": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"type": [
"Organization"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ example: |-
"type": [
"Organization"
],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"name": "Everything Ecom",
"location": {
"type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ example: |-
"type": [
"Organization"
],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"name": "Customs Trade Partnership Against Terrorism"
},
"issuanceDate": "2022-01-13T09:16:46Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ example: |-
"type": [
"Organization"
],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"name": "North Italy Chamber of Commerce"
},
"credentialSubject": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ example: |-
"type": [
"Organization"
],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"name": "Maxi Acero Mexicano",
"location": {
"type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ example: |-
"type": [
"Organization"
],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"name": "Xxinau Manufacturing Co. Ltd.",
"location": {
"type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ example: |-
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/traceability/v1"
],
"id": "did:key:z6MkfX5oKE8vuuftWn7mZJRZqpPTxGk9oK94gnCztcEkb7Vd",
"id": "did:web:organization.example.com",
"type": [
"VerifiableCredential",
"DCSATransportDocumentCredential"
Expand All @@ -111,7 +111,7 @@ example: |-
"type": [
"Organization"
],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"name": "MULTI CONTAINER LINE",
"location": {
"type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ example: |-
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/traceability/v1"
],
"id": "did:key:z6LSpdSReUHCjYcQb1243aF1vS7sd9ArK585Mm4ktARQxatd",
"id": "did:web:organization.example.com",
"issuer": {
"type": [
"Organization"
],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"name": "Everything Garden Stuff"
},
"issuanceDate": "2022-01-13T09:16:46Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ example: |-
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/traceability/v1"
],
"id": "did:key:z6LSpdSReUHCjYcQb1243aF1vS7sd9ArK585Mm4ktARQxatd",
"id": "did:web:organization.example.com",
"issuer": {
"type": [
"Organization"
],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"name": "Everything Garden Stuff"
},
"issuanceDate": "2022-01-13T09:16:46Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ example: |-
"type": [
"Organization"
],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"name": "Onwards A/S",
"location": {
"type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ example: |-
"type": [
"Organization"
],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U"
"id": "did:web:organization.example.com"
},
"issuanceDate": "2022-11-01T10:58:45-04:00",
"credentialSubject": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ example: |-
"name": "FSMA Creating CTE Certificate",
"issuanceDate": "2021-12-11T03:50:55Z",
"issuer": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"type": [
"Organization"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ example: |-
"name": "FSMA First Receiver Data Certificate",
"issuanceDate": "2021-12-11T03:50:55Z",
"issuer": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"type": [
"Organization"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ example: |-
"name": "FSMA Growing CTE Certificate",
"issuanceDate": "2021-12-11T03:50:55Z",
"issuer": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"type": [
"Organization"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ example: |-
"name": "FSMA Receiving CTE Certificate",
"issuanceDate": "2021-12-11T03:50:55Z",
"issuer": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"type": [
"Organization"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ example: |-
"name": "FSMA Shipping CTE Certificate",
"issuanceDate": "2021-12-11T03:50:55Z",
"issuer": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"type": [
"Organization"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ example: |-
"name": "FSMA Transforming CTE Certificate",
"issuanceDate": "2021-12-11T03:50:55Z",
"issuer": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"type": [
"Organization"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ example: |-
"name": "Food Defense Inspection Credential",
"issuanceDate": "2021-12-11T03:50:55Z",
"issuer": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"type": [
"Organization"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ example: |-
"name": "Food Grade Inspection Certificate",
"issuanceDate": "2021-12-11T03:50:55Z",
"issuer": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"type": [
"Organization"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ example: |-
"type": [
"Organization"
],
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"name": "MULTI CONTAINER LINE",
"location": {
"type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ example: |-
"name": "GAP Inspection Certificate",
"issuanceDate": "2021-12-11T03:50:55Z",
"issuer": {
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"id": "did:web:organization.example.com",
"type": [
"Organization"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ example: |-
"VerifiableCredential",
"GS18PrefixLicenseCredential"
],
"issuer": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"issuer": "did:web:organization.example.com",
"issuanceDate": "2005-01-01T00:00:00Z",
"credentialSubject": {
"id": "did:web:www.gs1ca.org",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ example: |-
"VerifiableCredential",
"GS1CompanyPrefixLicenseCredential"
],
"issuer": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"issuer": "did:web:organization.example.com",
"issuanceDate": "2020-11-19T14:56:37Z",
"credentialSubject": {
"id": "did:web:www.example.ca",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ example: |-
"VerifiableCredential",
"GS1DataCredential"
],
"issuer": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"issuer": "did:web:organization.example.com",
"issuanceDate": "2020-12-03T03:14:59Z",
"credentialSubject": {
"id": "https://id.gs1.org/01/07541234555551",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ example: |-
"VerifiableCredential",
"GS1DelegationCredential"
],
"issuer": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"issuer": "did:web:organization.example.com",
"issuanceDate": "2020-12-03T03:14:59Z",
"credentialSubject": {
"id": "did:web:www.egsolutionprovider.ca",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ example: |-
"VerifiableCredential",
"GS1IdentificationKeyLicenseCredential"
],
"issuer": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"issuer": "did:web:organization.example.com",
"issuanceDate": "2020-11-19T14:56:37Z",
"credentialSubject": {
"id": "did:web:www.example.ca",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ example: |-
"VerifiableCredential",
"GS1KeyCredential"
],
"issuer": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"issuer": "did:web:organization.example.com",
"issuanceDate": "2020-12-02T09:48:11Z",
"credentialSubject": {
"id": "https://id.gs1.org/01/07541234555551",
Expand Down
Loading

0 comments on commit f143a6f

Please sign in to comment.