-
Notifications
You must be signed in to change notification settings - Fork 35
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 #736 from w3c-ccg/feat/v2-test-suite
Add v2 test suite
- Loading branch information
Showing
21 changed files
with
24,336 additions
and
16,479 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: VCDM v2 Test Suite | ||
|
||
on: [push] | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.15.1 | ||
cache: 'npm' | ||
- run: npm i | ||
- run: npm t | ||
working-directory: packages/traceability-tests | ||
|
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 |
---|---|---|
|
@@ -16,5 +16,3 @@ docs/testsuite/jest-html-reporters-attach/index.js | |
|
||
packages/traceability-schemas/data/*.json | ||
|
||
|
||
traceability-tests |
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 |
---|---|---|
|
@@ -266,5 +266,9 @@ | |
{ | ||
"type": "AgricultureCanineCard", | ||
"count": 20 | ||
}, | ||
{ | ||
"type": "ActivityPubActorCard", | ||
"count": 0 | ||
} | ||
] |
140 changes: 140 additions & 0 deletions
140
docs/openapi/components/schemas/credentials/ActivityPubActorCard.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,140 @@ | ||
$linkedData: | ||
term: ActivityPubActorCard | ||
'@id': https://w3id.org/traceability#ActivityPubActorCard | ||
title: ActivityPub Actor Card | ||
tags: | ||
- VCDMv2 | ||
- Other | ||
description: | | ||
A test credential for Verifiable Credential v2 | ||
type: object | ||
required: | ||
- '@context' | ||
- id | ||
- type | ||
- issuanceDate | ||
- issuer | ||
- credentialSchema | ||
- credentialSubject | ||
properties: | ||
'@context': | ||
type: array | ||
readOnly: true | ||
default: | ||
- https://www.w3.org/2018/credentials/v1 | ||
- https://www.w3.org/ns/activitystreams | ||
items: | ||
- type: string | ||
const: https://www.w3.org/2018/credentials/v1 | ||
additionalItems: | ||
type: string | ||
enum: | ||
- https://www.w3.org/ns/activitystreams | ||
type: | ||
type: array | ||
readOnly: true | ||
default: | ||
- VerifiableCredential | ||
- ActivityPubActorCard | ||
const: | ||
- VerifiableCredential | ||
- ActivityPubActorCard | ||
items: | ||
type: string | ||
enum: | ||
- VerifiableCredential | ||
- ActivityPubActorCard | ||
id: | ||
type: string | ||
format: uri | ||
issuanceDate: | ||
type: string | ||
format: date-time | ||
issuer: | ||
type: object | ||
properties: | ||
id: | ||
type: string | ||
format: uri | ||
credentialSubject: | ||
type: object | ||
properties: | ||
type: | ||
type: array | ||
items: | ||
type: string | ||
# https://www.w3.org/TR/activitystreams-vocabulary/#actor-types | ||
enum: | ||
- Application | ||
- Group | ||
- Organization | ||
- Person | ||
- Service | ||
required: | ||
- id | ||
- type | ||
additionalProperties: true | ||
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/ActivityPubActorCard.yml | ||
default: https://w3id.org/traceability/openapi/components/schemas/credentials/ActivityPubActorCard.yml | ||
readOnly: true | ||
type: | ||
title: Type | ||
description: The type of validation to be run against the defined schema | ||
const: JsonSchema | ||
additionalProperties: false | ||
required: | ||
- id | ||
- type | ||
proof: | ||
type: object | ||
additionalProperties: false | ||
example: |- | ||
{ | ||
"@context": [ | ||
"https://www.w3.org/2018/credentials/v1", | ||
"https://www.w3.org/ns/activitystreams" | ||
], | ||
"id": "urn:credential:1a667a1c-f761-4172-b110-5610ad25f50b", | ||
"type": [ | ||
"VerifiableCredential", | ||
"ActivityPubActorCard" | ||
], | ||
"credentialSchema": { | ||
"id": "https://w3c-ccg.github.io/traceability-vocab/openapi/components/schemas/credentials/ActivityPubActorCard.yml", | ||
"type": "JsonSchema" | ||
}, | ||
"issuanceDate": "2023-05-21T15:39:57.944Z", | ||
"issuer": { | ||
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U" | ||
}, | ||
"credentialSubject": { | ||
"type": ["Person"], | ||
"id": "https://kenzoishii.example.com/", | ||
"following": "https://kenzoishii.example.com/following.json", | ||
"followers": "https://kenzoishii.example.com/followers.json", | ||
"liked": "https://kenzoishii.example.com/liked.json", | ||
"inbox": "https://kenzoishii.example.com/inbox.json", | ||
"outbox": "https://kenzoishii.example.com/feed.json", | ||
"preferredUsername": "kenzoishii", | ||
"name": "石井健蔵", | ||
"summary": "この方はただの例です", | ||
"icon": [ | ||
"https://kenzoishii.example.com/image/165987aklre4" | ||
] | ||
}, | ||
"proof": { | ||
"type": "Ed25519Signature2018", | ||
"created": "2023-05-21T15:45:14Z", | ||
"verificationMethod": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U#z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U", | ||
"proofPurpose": "assertionMethod", | ||
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..Ijk7g1eOw6juX1yNCHPTPyMA78MwYTLFSBcoNhPrr1ejGuClfT16qo38ALiV7G4qbp5AX9QcMoKkF1ZKx4l0DA" | ||
} | ||
} |
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
Oops, something went wrong.