-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(prism-agent): fix schema-related unit-tests
Signed-off-by: Benjamin Voiturier <[email protected]>
- Loading branch information
1 parent
fb1592d
commit 29d166b
Showing
5 changed files
with
109 additions
and
189 deletions.
There are no files selected for viewing
32 changes: 8 additions & 24 deletions
32
pollux/lib/core/src/test/resources/anoncred-presentation-schema-example.json
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 |
---|---|---|
@@ -1,26 +1,10 @@ | ||
{ | ||
"guid": "1631026d-5d55-3285-8ccd-bd70480cfbdc", | ||
"id": "329da384-b2bb-497f-a605-4118dec75d31", | ||
"longId": "did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff/329da384-b2bb-497f-a605-4118dec75d31?version=5.0.0", | ||
"name": "DrivingLicense", | ||
"version": "5.0.0", | ||
"tags": [ | ||
"string" | ||
"name": "resource:///anoncred-presentation-schema-example.json", | ||
"version": "1.0", | ||
"attrNames": [ | ||
"name", | ||
"sex", | ||
"age" | ||
], | ||
"description": "Simple credential schema for the driving licence verifiable credential.", | ||
"type": "AnoncredSchemaV1", | ||
"schema": { | ||
"name": "resource:///anoncred-presentation-schema-example.json", | ||
"version": "1.0", | ||
"attrNames": [ | ||
"name", | ||
"sex", | ||
"age" | ||
], | ||
"issuerId": "did:prism:issuer" | ||
}, | ||
"author": "did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff", | ||
"authored": "2023-04-06T08:48:01.654162Z", | ||
"kind": "CredentialSchema", | ||
"self": "/schema-registry/schemas/1631026d-5d55-3285-8ccd-bd70480cfbdc" | ||
} | ||
"issuerId": "did:prism:issuer" | ||
} |
34 changes: 9 additions & 25 deletions
34
pollux/lib/core/src/test/resources/anoncred-schema-example.json
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 |
---|---|---|
@@ -1,28 +1,12 @@ | ||
{ | ||
"guid": "1631026d-5d55-3285-8ccd-bd70480cfbdc", | ||
"id": "329da384-b2bb-497f-a605-4118dec75d31", | ||
"longId": "did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff/329da384-b2bb-497f-a605-4118dec75d31?version=5.0.0", | ||
"name": "DrivingLicense", | ||
"version": "5.0.0", | ||
"tags": [ | ||
"string" | ||
"name": "Driving licence Anoncred Schema", | ||
"version": "1.0", | ||
"attrNames": [ | ||
"emailAddress", | ||
"familyName", | ||
"dateOfIssuance", | ||
"drivingLicenseID", | ||
"drivingClass" | ||
], | ||
"description": "Simple credential schema for the driving licence verifiable credential.", | ||
"type": "AnoncredSchemaV1", | ||
"schema": { | ||
"name": "Driving licence Anoncred Schema", | ||
"version": "1.0", | ||
"attrNames": [ | ||
"emailAddress", | ||
"familyName", | ||
"dateOfIssuance", | ||
"drivingLicenseID", | ||
"drivingClass" | ||
], | ||
"issuerId": "http://www.example.com/issuer" | ||
}, | ||
"author": "did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff", | ||
"authored": "2023-04-06T08:48:01.654162Z", | ||
"kind": "CredentialSchema", | ||
"self": "/schema-registry/schemas/1631026d-5d55-3285-8ccd-bd70480cfbdc" | ||
"issuerId": "http://www.example.com/issuer" | ||
} |
98 changes: 41 additions & 57 deletions
98
pollux/lib/core/src/test/resources/vc-schema-example.json
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 |
---|---|---|
@@ -1,60 +1,44 @@ | ||
{ | ||
"guid": "1631026d-5d55-3285-8ccd-bd70480cfbdc", | ||
"id": "329da384-b2bb-497f-a605-4118dec75d31", | ||
"longId": "did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff/329da384-b2bb-497f-a605-4118dec75d31?version=5.0.0", | ||
"name": "DrivingLicense", | ||
"version": "5.0.0", | ||
"tags": [ | ||
"string" | ||
], | ||
"description": "Simple credential schema for the driving licence verifiable credential.", | ||
"type": "https://w3c-ccg.github.io/vc-json-schemas/schema/2.0/schema.json", | ||
"schema": { | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"description": "Driving License", | ||
"type": "object", | ||
"properties": { | ||
"credentialSubject": { | ||
"type": "object", | ||
"properties": { | ||
"emailAddress": { | ||
"type": "string", | ||
"format": "email" | ||
}, | ||
"givenName": { | ||
"type": "string" | ||
}, | ||
"familyName": { | ||
"type": "string" | ||
}, | ||
"dateOfIssuance": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"drivingLicenseID": { | ||
"type": "string" | ||
}, | ||
"drivingClass": { | ||
"type": "integer" | ||
} | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"description": "Driving License", | ||
"type": "object", | ||
"properties": { | ||
"credentialSubject": { | ||
"type": "object", | ||
"properties": { | ||
"emailAddress": { | ||
"type": "string", | ||
"format": "email" | ||
}, | ||
"givenName": { | ||
"type": "string" | ||
}, | ||
"familyName": { | ||
"type": "string" | ||
}, | ||
"required": [ | ||
"emailAddress", | ||
"familyName", | ||
"dateOfIssuance", | ||
"drivingLicenseID", | ||
"drivingClass" | ||
], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"required": [ | ||
"credentialSubject" | ||
], | ||
"additionalProperties": false | ||
"dateOfIssuance": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"drivingLicenseID": { | ||
"type": "string" | ||
}, | ||
"drivingClass": { | ||
"type": "integer" | ||
} | ||
}, | ||
"required": [ | ||
"emailAddress", | ||
"familyName", | ||
"dateOfIssuance", | ||
"drivingLicenseID", | ||
"drivingClass" | ||
], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"author": "did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff", | ||
"authored": "2023-04-06T08:48:01.654162Z", | ||
"kind": "CredentialSchema", | ||
"self": "/schema-registry/schemas/1631026d-5d55-3285-8ccd-bd70480cfbdc" | ||
} | ||
"required": [ | ||
"credentialSubject" | ||
], | ||
"additionalProperties": false | ||
} |
36 changes: 10 additions & 26 deletions
36
prism-agent/service/server/src/test/resources/anoncred-schema-example.json
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 |
---|---|---|
@@ -1,28 +1,12 @@ | ||
{ | ||
"guid": "1631026d-5d55-3285-8ccd-bd70480cfbdc", | ||
"id": "329da384-b2bb-497f-a605-4118dec75d31", | ||
"longId": "did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff/329da384-b2bb-497f-a605-4118dec75d31?version=5.0.0", | ||
"name": "DrivingLicense", | ||
"version": "5.0.0", | ||
"tags": [ | ||
"string" | ||
"name": "Driving licence Anoncred Schema", | ||
"version": "1.0", | ||
"attrNames": [ | ||
"emailAddress", | ||
"familyName", | ||
"dateOfIssuance", | ||
"drivingLicenseID", | ||
"drivingClass" | ||
], | ||
"description": "Simple credential schema for the driving licence verifiable credential.", | ||
"type": "AnoncredSchemaV1", | ||
"schema": { | ||
"name": "Driving licence Anoncred Schema", | ||
"version": "1.0", | ||
"attrNames": [ | ||
"emailAddress", | ||
"familyName", | ||
"dateOfIssuance", | ||
"drivingLicenseID", | ||
"drivingClass" | ||
], | ||
"issuerId": "http://www.example.com/issuer" | ||
}, | ||
"author": "did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff", | ||
"authored": "2023-04-06T08:48:01.654162Z", | ||
"kind": "CredentialSchema", | ||
"self": "/schema-registry/schemas/1631026d-5d55-3285-8ccd-bd70480cfbdc" | ||
} | ||
"issuerId": "http://www.example.com/issuer" | ||
} |
98 changes: 41 additions & 57 deletions
98
prism-agent/service/server/src/test/resources/vc-schema-example.json
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 |
---|---|---|
@@ -1,60 +1,44 @@ | ||
{ | ||
"guid": "1631026d-5d55-3285-8ccd-bd70480cfbdc", | ||
"id": "329da384-b2bb-497f-a605-4118dec75d31", | ||
"longId": "did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff/329da384-b2bb-497f-a605-4118dec75d31?version=5.0.0", | ||
"name": "DrivingLicense", | ||
"version": "5.0.0", | ||
"tags": [ | ||
"string" | ||
], | ||
"description": "Simple credential schema for the driving licence verifiable credential.", | ||
"type": "https://w3c-ccg.github.io/vc-json-schemas/schema/2.0/schema.json", | ||
"schema": { | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"description": "Driving License", | ||
"type": "object", | ||
"properties": { | ||
"credentialSubject": { | ||
"type": "object", | ||
"properties": { | ||
"emailAddress": { | ||
"type": "string", | ||
"format": "email" | ||
}, | ||
"givenName": { | ||
"type": "string" | ||
}, | ||
"familyName": { | ||
"type": "string" | ||
}, | ||
"dateOfIssuance": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"drivingLicenseID": { | ||
"type": "string" | ||
}, | ||
"drivingClass": { | ||
"type": "integer" | ||
} | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"description": "Driving License", | ||
"type": "object", | ||
"properties": { | ||
"credentialSubject": { | ||
"type": "object", | ||
"properties": { | ||
"emailAddress": { | ||
"type": "string", | ||
"format": "email" | ||
}, | ||
"givenName": { | ||
"type": "string" | ||
}, | ||
"familyName": { | ||
"type": "string" | ||
}, | ||
"required": [ | ||
"emailAddress", | ||
"familyName", | ||
"dateOfIssuance", | ||
"drivingLicenseID", | ||
"drivingClass" | ||
], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"required": [ | ||
"credentialSubject" | ||
], | ||
"additionalProperties": false | ||
"dateOfIssuance": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"drivingLicenseID": { | ||
"type": "string" | ||
}, | ||
"drivingClass": { | ||
"type": "integer" | ||
} | ||
}, | ||
"required": [ | ||
"emailAddress", | ||
"familyName", | ||
"dateOfIssuance", | ||
"drivingLicenseID", | ||
"drivingClass" | ||
], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"author": "did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff", | ||
"authored": "2023-04-06T08:48:01.654162Z", | ||
"kind": "CredentialSchema", | ||
"self": "/schema-registry/schemas/1631026d-5d55-3285-8ccd-bd70480cfbdc" | ||
} | ||
"required": [ | ||
"credentialSubject" | ||
], | ||
"additionalProperties": false | ||
} |