Skip to content

Commit

Permalink
chore: removes @type from the schema and tests (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolf4ood authored Dec 13, 2024
1 parent d9f3fb7 commit b9f9037
Show file tree
Hide file tree
Showing 16 changed files with 91 additions and 266 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,15 @@
},
"requestId": {
"type": "string"
}
},
"oneOf": [
{
"properties": {
"@type": {
"type": "string",
"const": "CredentialMessage"
}
},
"required": [
"@type"
]
},
{
"properties": {
"type": {
"type": "string",
"const": "CredentialMessage"
}
},
"required": [
"type"
]
"type": {
"type": "string",
"const": "CredentialMessage"
}
],
},
"required": [
"@context",
"type",
"credentials",
"requestId"
]
Expand All @@ -62,34 +43,15 @@
"type": [
"string"
]
}
},
"oneOf": [
{
"properties": {
"@type": {
"type": "string",
"const": "CredentialContainer"
}
},
"required": [
"@type"
]
},
{
"properties": {
"type": {
"type": "string",
"const": "CredentialContainer"
}
},
"required": [
"type"
]
"type": {
"type": "string",
"const": "CredentialContainer"
}
],
},
"required": [
"payload"
"payload",
"type"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,38 +36,19 @@
"issuancePolicy": {
"type": "object",
"$ref": "https://identity.foundation/presentation-exchange/schemas/presentation-definition.json"
}
},
"oneOf": [
{
"properties": {
"@type": {
"type": "string",
"const": "CredentialObject"
}
},
"required": [
"@type"
]
},
{
"properties": {
"type": {
"type": "string",
"const": "CredentialObject"
}
},
"required": [
"type"
]
"type": {
"type": "string",
"const": "CredentialObject"
}
],
},
"required": [
"credentialType",
"offerReason",
"bindingMethods",
"cryptography",
"issuancePolicy"
"issuancePolicy",
"type"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,17 @@
"items": {
"$ref": "https://w3id.org/dspace-dcp/v0.8/issuance/credential-object-schema.json#/definitions/CredentialObject"
}
}
},
"oneOf": [
{
"properties": {
"@type": {
"type": "string",
"const": "CredentialOfferMessage"
}
},
"required": [
"@type"
]
},
{
"properties": {
"type": {
"type": "string",
"const": "CredentialOfferMessage"
}
},
"required": [
"type"
]
"type": {
"type": "string",
"const": "CredentialOfferMessage"
}
],
},
"required": [
"@context",
"credentialIssuer",
"credentials"
"credentials",
"type"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,15 @@
"items": {
"type": "string"
}
}
},
"oneOf": [
{
"properties": {
"@type": {
"type": "string",
"const": "CredentialRequestMessage"
}
},
"required": [
"@type"
]
},
{
"properties": {
"type": {
"type": "string",
"const": "CredentialRequestMessage"
}
},
"required": [
"type"
]
"type": {
"type": "string",
"const": "CredentialRequestMessage"
}
],
},
"required": [
"@context",
"type",
"format",
"credentialType"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,16 @@
"REJECTED",
"ISSUED"
]
}
},
"oneOf": [
{
"properties": {
"@type": {
"type": "string",
"const": "CredentialStatus"
}
},
"required": [
"@type"
]
},
{
"properties": {
"type": {
"type": "string",
"const": "CredentialStatus"
}
},
"required": [
"type"
]
"type": {
"type": "string",
"const": "CredentialStatus"
}
],
},
"required": [
"requestId",
"status"
"status",
"type"
]
},
"CredentialStatus": {
Expand Down
31 changes: 6 additions & 25 deletions artifacts/src/main/resources/issuance/issuer-metadata-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,17 @@
"items": {
"$ref": "https://w3id.org/dspace-dcp/v0.8/issuance/credential-object-schema.json#/definitions/CredentialObject"
}
}
},
"oneOf": [
{
"properties": {
"@type": {
"type": "string",
"const": "IssuerMetadata"
}
},
"required": [
"@type"
]
},
{
"properties": {
"type": {
"type": "string",
"const": "IssuerMetadata"
}
},
"required": [
"type"
]
"type": {
"type": "string",
"const": "IssuerMetadata"
}
],
},
"required": [
"@context",
"credentialIssuer",
"credentialsSupported"
"credentialsSupported",
"type"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
"properties": {
"@context": {
"$ref": "https://w3id.org/dspace-dcp/v0.8/common/context-schema.json"
},
"type": {
"type": "string",
"const": "PresentationQueryMessage"
}
},
"allOf": [
Expand Down Expand Up @@ -44,36 +48,11 @@
]
}
]
},
{
"oneOf": [
{
"properties": {
"@type": {
"type": "string",
"const": "PresentationQueryMessage"
}
},
"required": [
"@type"
]
},
{
"properties": {
"type": {
"type": "string",
"const": "PresentationQueryMessage"
}
},
"required": [
"type"
]
}
]
}
],
"required": [
"@context"
"@context",
"type"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,15 @@
"string"
]
}
}
},
"oneOf": [
{
"properties": {
"@type": {
"type": "string",
"const": "PresentationResponseMessage"
}
},
"required": [
"@type"
]
},
{
"properties": {
"type": {
"type": "string",
"const": "PresentationResponseMessage"
}
},
"required": [
"type"
]
"type": {
"type": "string",
"const": "PresentationResponseMessage"
}
],
},
"required": [
"@context",
"type",
"presentation"
]
}
Expand Down
Loading

0 comments on commit b9f9037

Please sign in to comment.