Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump ns and context to v1 #131

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/autopublish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
run: |
cp specifications/*.png .
cp specifications/*.yaml .
mkdir -p resources/v0.8
cp -r artifacts/src/main/resources/* resources/v0.8
mkdir -p resources/v1.0
cp -r artifacts/src/main/resources/* resources/v1.0
rm -rf artifacts
- name: Run Respec
run:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
public interface SchemaConstants {

String DCP_CONTEXT = "https://w3id.org/dspace-dcp/v0.8";
String DCP_PREFIX = "https://w3id.org/dspace-dcp/v0.8/";
String DCP_CONTEXT = "https://w3id.org/dspace-dcp/v1.0/dcp.jsonld";
String DCP_PREFIX = "https://w3id.org/dspace-dcp/v1.0/";

}
2 changes: 1 addition & 1 deletion artifacts/src/main/resources/common/context-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"contains": {
"const": "https://w3id.org/dspace-dcp/v0.8"
"const": "https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions artifacts/src/main/resources/context/dcp.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"@context": {
"@version": 1.1,
"@protected": true,
"dcp": "https://w3id.org/dspace-dcp/v0.8/",
"dcp": "https://w3id.org/dspace-dcp/v1.0/",
"cred": "https://www.w3.org/2018/credentials/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"id": "@id",
Expand Down Expand Up @@ -53,7 +53,7 @@
},
"issuancePolicy": {
"@id": "dcp:issuancePolicy",
"@type":"@json"
"@type": "@json"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
"$ref": "#/definitions/CredentialMessage"
}
],
"$id": "https://w3id.org/dspace-dcp/v0.8/presentation/credential-message-schema.json",
"$id": "https://w3id.org/dspace-dcp/v1.0/presentation/credential-message-schema.json",
"definitions": {
"CredentialMessage": {
"type": "object",
"properties": {
"@context": {
"$ref": "https://w3id.org/dspace-dcp/v0.8/common/context-schema.json"
"$ref": "https://w3id.org/dspace-dcp/v1.0/common/context-schema.json"
},
"credentials": {
"type": "array",
"items": {
"$ref": "https://w3id.org/dspace-dcp/v0.8/presentation/credential-message-schema.json#/definitions/CredentialContainer"
"$ref": "https://w3id.org/dspace-dcp/v1.0/presentation/credential-message-schema.json#/definitions/CredentialContainer"
}
},
"requestId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"$ref": "#/definitions/CredentialObject"
}
],
"$id": "https://w3id.org/dspace-dcp/v0.8/issuance/credential-object-schema.json",
"$id": "https://w3id.org/dspace-dcp/v1.0/issuance/credential-object-schema.json",
"definitions": {
"CredentialObject": {
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
"$ref": "#/definitions/CredentialOfferMessage"
}
],
"$id": "https://w3id.org/dspace-dcp/v0.8/issuance/credential-offer-message-schema.json",
"$id": "https://w3id.org/dspace-dcp/v1.0/issuance/credential-offer-message-schema.json",
"definitions": {
"CredentialOfferMessage": {
"type": "object",
"properties": {
"@context": {
"$ref": "https://w3id.org/dspace-dcp/v0.8/common/context-schema.json"
"$ref": "https://w3id.org/dspace-dcp/v1.0/common/context-schema.json"
},
"credentialIssuer": {
"type": "string"
},
"credentials": {
"type": "array",
"items": {
"$ref": "https://w3id.org/dspace-dcp/v0.8/issuance/credential-object-schema.json#/definitions/CredentialObject"
"$ref": "https://w3id.org/dspace-dcp/v1.0/issuance/credential-object-schema.json#/definitions/CredentialObject"
}
},
"type": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"$ref": "#/definitions/CredentialRequestMessage"
}
],
"$id": "https://w3id.org/dspace-dcp/v0.8/issuance/credential-request-message-schema.json",
"$id": "https://w3id.org/dspace-dcp/v1.0/issuance/credential-request-message-schema.json",
"definitions": {
"CredentialRequestMessage": {
"type": "object",
"properties": {
"@context": {
"$ref": "https://w3id.org/dspace-dcp/v0.8/common/context-schema.json"
"$ref": "https://w3id.org/dspace-dcp/v1.0/common/context-schema.json"
},
"format": {
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"$ref": "#/definitions/CredentialStatus"
}
],
"$id": "https://w3id.org/dspace-dcp/v0.8/issuance/credential-status-schema.json",
"$id": "https://w3id.org/dspace-dcp/v1.0/issuance/credential-status-schema.json",
"definitions": {
"CredentialStatusClass": {
"type": "object",
Expand Down Expand Up @@ -43,7 +43,7 @@
{
"properties": {
"@context": {
"$ref": "https://w3id.org/dspace-dcp/v0.8/common/context-schema.json"
"$ref": "https://w3id.org/dspace-dcp/v1.0/common/context-schema.json"
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context": [
"https://w3id.org/dspace-dcp/v0.8"
"https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"
],
"type": "CredentialMessage",
"credentials": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context": [
"https://w3id.org/dspace-dcp/v0.8",
"https://w3id.org/dspace-dcp/v1.0/dcp.jsonld",
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context": [
"https://w3id.org/dspace-dcp/v0.8",
"https://w3id.org/dspace-dcp/v1.0/dcp.jsonld",
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
Expand All @@ -19,7 +19,10 @@
"did:web"
],
"cryptography": [
"JsonWebSignature2020", "eddsa-rdfc-2022", "eddsa-jcs-2022", "..."
"JsonWebSignature2020",
"eddsa-rdfc-2022",
"eddsa-jcs-2022",
"..."
],
"issuancePolicy": {
"id": "Scalable trust example",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context": [
"https://w3id.org/dspace-dcp/v0.8",
"https://w3id.org/dspace-dcp/v1.0/dcp.jsonld",
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context": [
"https://w3id.org/dspace-dcp/v0.8"
"https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"
],
"type": "CredentialStatus",
"requestId": "requestId",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context": [
"https://w3id.org/dspace-dcp/v0.8",
"https://w3id.org/dspace-dcp/v1.0/dcp.jsonld",
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
Expand All @@ -18,7 +18,10 @@
"did:web"
],
"cryptography": [
"JsonWebSignature2020", "eddsa-rdfc-2022", "eddsa-jcs-2022", "..."
"JsonWebSignature2020",
"eddsa-rdfc-2022",
"eddsa-jcs-2022",
"..."
],
"issuancePolicy": {
"id": "Scalable trust example",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
"$ref": "#/definitions/IssuerMetadata"
}
],
"$id": "https://w3id.org/dspace-dcp/v0.8/issuance/issuer-metadata-schema.json",
"$id": "https://w3id.org/dspace-dcp/v1.0/issuance/issuer-metadata-schema.json",
"definitions": {
"IssuerMetadata": {
"type": "object",
"properties": {
"@context": {
"$ref": "https://w3id.org/dspace-dcp/v0.8/common/context-schema.json"
"$ref": "https://w3id.org/dspace-dcp/v1.0/common/context-schema.json"
},
"credentialsSupported": {
"type": "array",
"items": {
"$ref": "https://w3id.org/dspace-dcp/v0.8/issuance/credential-object-schema.json#/definitions/CredentialObject"
"$ref": "https://w3id.org/dspace-dcp/v1.0/issuance/credential-object-schema.json#/definitions/CredentialObject"
}
},
"type": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context": [
"https://w3id.org/dspace-dcp/v0.8"
"https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"
],
"type": "PresentationQueryMessage",
"presentationDefinition": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context": [
"https://w3id.org/dspace-dcp/v0.8"
"https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"
],
"type": "PresentationQueryMessage",
"scope": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context": [
"https://w3id.org/dspace-dcp/v0.8"
"https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"
],
"type": "PresentationResponseMessage",
"presentation": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"$ref": "#/definitions/PresentationQueryMessage"
}
],
"$id": "https://w3id.org/dspace-dcp/v0.8/presentation/presentation-query-message-schema.json",
"$id": "https://w3id.org/dspace-dcp/v1.0/presentation/presentation-query-message-schema.json",
"definitions": {
"PresentationQueryMessage": {
"type": "object",
"properties": {
"@context": {
"$ref": "https://w3id.org/dspace-dcp/v0.8/common/context-schema.json"
"$ref": "https://w3id.org/dspace-dcp/v1.0/common/context-schema.json"
},
"type": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"$ref": "#/definitions/PresentationResponseMessage"
}
],
"$id": "https://w3id.org/dspace-dcp/v0.8/presentation/presentation-response-message-schema.json",
"$id": "https://w3id.org/dspace-dcp/v1.0/presentation/presentation-response-message-schema.json",
"definitions": {
"PresentationResponseMessage": {
"type": "object",
"properties": {
"@context": {
"$ref": "https://w3id.org/dspace-dcp/v0.8/common/context-schema.json"
"$ref": "https://w3id.org/dspace-dcp/v1.0/common/context-schema.json"
},
"presentation": {
"type": "array",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void verifyCredentialStatus() {
void verifyCredentialStatus_withStatus(String status) throws IOException {
var msg = """
{
"@context": ["https://w3id.org/dspace-dcp/v0.8"],
"@context": ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"],
"type": "CredentialStatus",
"requestId": "requestId",
"status": "%s"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class CredentialMessageSchemaTest extends AbstractSchemaTest {
private static final String CREDENTIAL_MESSAGE_MESSAGE = """
{
"@context": [
"https://w3id.org/dspace-dcp/v0.8"
"https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"
],
"type": "CredentialMessage",
"credentials": [
Expand All @@ -40,13 +40,13 @@ public class CredentialMessageSchemaTest extends AbstractSchemaTest {

private static final String INVALID_CREDENTIAL_MESSAGE = """
{
"@context": ["https://w3id.org/dspace-dcp/v0.8"],
"@context": ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"],
"type": "CredentialMessage"
}""";

private static final String INVALID_CREDENTIAL_MESSAGE_INVALID_CREDENTIAL_CONTAINER = """
{
"@context": ["https://w3id.org/dspace-dcp/v0.8"],
"@context": ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"],
"type": "CredentialMessage",
"credentials": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ public class CredentialOfferMessageSchemaTest extends AbstractSchemaTest {

private static final String CREDENTIAL_OFFER_MESSAGE = """
{
"@context": ["https://w3id.org/dspace-dcp/v0.8"],
"@context": ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"],
"type": "CredentialOfferMessage",
"credentialIssuer": "issuer",
"credentials": [%s]
}""";

private static final String INVALID_CREDENTIAL_REQUEST_MESSAGE_NO_CREDENTIAL_ISSUER = """
{
"@context": ["https://w3id.org/dspace-dcp/v0.8"],
"@context": ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"],
"type": "CredentialOfferMessage",
"credentials": [%s]
}""";

private static final String INVALID_CREDENTIAL_REQUEST_MESSAGE_NO_CREDENTIALS = """
{
"@context": ["https://w3id.org/dspace-dcp/v0.8"],
"@context": ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"],
"type": "CredentialOfferMessage",
"credentialIssuer": "issuer"
}""";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ public class CredentialRequestMessageSchemaTest extends AbstractSchemaTest {

private static final String CREDENTIAL_REQUEST_MESSAGE = """
{
"@context": ["https://w3id.org/dspace-dcp/v0.8"],
"@context": ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"],
"type": "CredentialRequestMessage",
"format": "jwt",
"credentialType": ["VerifiableCredential"]
}""";

private static final String INVALID_CREDENTIAL_REQUEST_MESSAGE_NO_FORMAT = """
{
"@context": ["https://w3id.org/dspace-dcp/v0.8"],
"@context": ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"],
"type": "CredentialRequestMessage",
"credentialType": ["VerifiableCredential"]
}""";

private static final String INVALID_CREDENTIAL_REQUEST_MESSAGE_NO_CREDENTIAL_TYPE = """
{
"@context": ["https://w3id.org/dspace-dcp/v0.8"],
"@context": ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"],
"type": "CredentialRequestMessage",
"format": "jwt"
}""";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ public class CredentialStatusSchemaTest extends AbstractSchemaTest {

private static final String CREDENTIAL_STATUS = """
{
"@context": ["https://w3id.org/dspace-dcp/v0.8"],
"@context": ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"],
"type": "CredentialStatus",
"requestId": "requestId",
"status": "%s"
}""";

private static final String INVALID_CREDENTIAL_STATUS = """
{
"@context": ["https://w3id.org/dspace-dcp/v0.8"],
"@context": ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"],
"type": "CredentialStatus"
}""";

Expand Down
Loading
Loading