Skip to content

Commit e40333b

Browse files
author
gabe
committed
not quite working...
1 parent 742040c commit e40333b

File tree

18 files changed

+428
-53
lines changed

18 files changed

+428
-53
lines changed

implementations/sample.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
"2020-12": [
55
"JsonSchema",
66
"JsonSchemaCredential"
7+
],
8+
"2019-09": [
9+
"JsonSchema",
10+
"JsonSchemaCredential"
11+
],
12+
"Draft-7": [
13+
"JsonSchema",
14+
"JsonSchemaCredential"
715
]
816
}
917
}

implementations/tbd/go.sum

Lines changed: 168 additions & 0 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"tests/*.js"
1919
],
2020
"scripts": {
21-
"test": "mocha tests/ --reporter @digitalbazaar/mocha-w3c-interop-reporter --reporter-options abstract=\"$PWD/abstract.hbs\",reportDir=\"$PWD/reports\",respec=\"$PWD/respecConfig.json\",title=\"VC JSON Schema Test Suite\",suiteLog='./suite.log' --timeout 15000 --preserve-symlinks",
21+
"test": "mocha tests/ --reporter @digitalbazaar/mocha-w3c-interop-reporter --reporter-options abstract=\"$PWD/abstract.hbs\",reportDir=\"$PWD/reports\",respec=\"$PWD/respecConfig.json\",title=\"VC JSON Schema Test Suite\",suiteLog='./suite.log' --timeout 1500000 --preserve-symlinks",
2222
"lint": "eslint ."
2323
},
2424
"engines": {

reports/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,22 +114,22 @@
114114
<section class="informative" id="conformance-testing-results">
115115
<h2> Conformance Testing Results </h2>
116116
<p>
117-
Tests passed 11/11 100%
117+
Tests passed 2/3 66%
118118
</p>
119119
<p>
120-
Tests failed 0/11 0%
120+
Tests failed 1/3 34%
121121
</p>
122122
<p>
123-
Failures 0
123+
Failures 1
124124
</p>
125125
<p>
126126
Tests skipped 0
127127
</p>
128128
<p>
129-
Total tests 11
129+
Total tests 3
130130
</p>
131131
<p>
132-
These tests were run on <time>24 August 2023 at 5:17 pm UTC</time>
132+
These tests were run on <time>24 August 2023 at 5:38 pm UTC</time>
133133
</p>
134134
<section class="informative" id="Key">
135135
<h3>Key</h3>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"@context": [
3+
"https://www.w3.org/ns/credentials/v2",
4+
"https://www.w3.org/ns/credentials/examples/v2"
5+
],
6+
"id": "https://example.com/credentials/3732",
7+
"type": ["VerifiableCredential", "EmailCredential"],
8+
"issuer": "https://example.com/issuers/14",
9+
"issuanceDate": "2010-01-01T19:23:24Z",
10+
"credentialSubject": {
11+
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
12+
"emailAddress": "[email protected]"
13+
},
14+
"credentialSchema": {
15+
"id": "https://example.com/schemas/email.json",
16+
"type": "JsonSchema"
17+
}
18+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$id": "https://example.com/schemas/email.json",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"name": "EmailCredential",
5+
"description": "EmailCredential using JsonSchema",
6+
"type": "object",
7+
"properties": {
8+
"credentialSubject": {
9+
"type": "object",
10+
"properties": {
11+
"emailAddress": {
12+
"type": "string",
13+
"format": "email"
14+
}
15+
},
16+
"required": [
17+
"emailAddress"
18+
]
19+
}
20+
}
21+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"@context": [
3+
"https://www.w3.org/ns/credentials/v2",
4+
"https://www.w3.org/ns/credentials/examples/v2"
5+
],
6+
"id": "https://example.com/credentials/3732",
7+
"type": ["VerifiableCredential", "EmailCredential"],
8+
"issuer": "https://example.com/issuers/14",
9+
"issuanceDate": "2010-01-01T19:23:24Z",
10+
"credentialSubject": {
11+
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
12+
"emailAddress": "[email protected]"
13+
},
14+
"credentialSchema": {
15+
"id": "https://example.com/schemas/email.json",
16+
"type": "JsonSchema"
17+
}
18+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$id": "https://example.com/schemas/email.json",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"name": "EmailCredential",
5+
"description": "EmailCredential using JsonSchema",
6+
"type": "object",
7+
"properties": {
8+
"credentialSubject": {
9+
"type": "object",
10+
"properties": {
11+
"emailAddress": {
12+
"type": "string",
13+
"format": "email"
14+
}
15+
},
16+
"required": [
17+
"emailAddress"
18+
]
19+
}
20+
}
21+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"@context": [
3+
"https://www.w3.org/ns/credentials/v2",
4+
"https://www.w3.org/ns/credentials/examples/v2"
5+
],
6+
"id": "https://example.com/credentials/3733",
7+
"type": ["VerifiableCredential", "ExampleEmailCredential"],
8+
"issuer": "https://example.com/issuers/14",
9+
"issuanceDate": "2010-01-01T19:23:24Z",
10+
"credentialSubject": {
11+
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
12+
"emailAddress": "[email protected]"
13+
},
14+
"credentialSchema": {
15+
"id": "https://example.com/credentials/3734",
16+
"type": "JsonSchemaCredential"
17+
}
18+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"@context": [
3+
"https://www.w3.org/ns/credentials/v2",
4+
"https://www.w3.org/ns/credentials/examples/v2"
5+
],
6+
"id": "https://example.com/credentials/3734",
7+
"type": ["VerifiableCredential", "JsonSchemaCredential"],
8+
"issuer": "https://example.com/issuers/14",
9+
"issuanceDate": "2010-01-01T19:23:24Z",
10+
"credentialSchema": {
11+
"id": "https://www.w3.org/2022/credentials/v2/json-schema-credential-schema.json",
12+
"type": "JsonSchema",
13+
"digestSRI": "sha384-S57yQDg1MTzF56Oi9DbSQ14u7jBy0RDdx0YbeV7shwhCS88G8SCXeFq82PafhCrW"
14+
},
15+
"credentialSubject": {
16+
"id": "https://example.com/schemas/email-credential-schema.json",
17+
"type": "JsonSchema",
18+
"jsonSchema": {
19+
"$id": "https://example.com/schemas/email-credential-schema.json",
20+
"$schema": "https://json-schema.org/draft/2020-12/schema",
21+
"name": "EmailCredential",
22+
"description": "EmailCredential using JsonSchemaCredential",
23+
"type": "object",
24+
"properties": {
25+
"credentialSubject": {
26+
"type": "object",
27+
"properties": {
28+
"emailAddress": {
29+
"type": "string",
30+
"format": "email"
31+
}
32+
},
33+
"required": ["emailAddress"]
34+
}
35+
}
36+
}
37+
}
38+
}

0 commit comments

Comments
 (0)