From 5ad6f4704fddb73c8638947342e2afa313b51bcd Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 3 Apr 2024 09:12:36 +0000 Subject: [PATCH] Automated build --- docs/schema/achievementcredential.json | 155 +++++++++++++----- docs/schema/endorsementcredential.json | 124 ++++++++++---- .../getopenbadgecredentialsresponse.json | 155 +++++++++++++----- docs/schema/profile.json | 75 ++++++--- 4 files changed, 382 insertions(+), 127 deletions(-) diff --git a/docs/schema/achievementcredential.json b/docs/schema/achievementcredential.json index d860db7c..9038a465 100644 --- a/docs/schema/achievementcredential.json +++ b/docs/schema/achievementcredential.json @@ -2,13 +2,19 @@ "$schema" : "https://json-schema.org/draft/2019-09/schema#", "$id" : "https://purl.imsglobal.org/spec/ob/v3p0/schema/json-ld/ob_v3p0_achievementcredential_schema.json", "title" : "JSON Schema for the AchievementCredential class.", - "description" : "AchievementCredentials are representations of an awarded achievement, used to share information about a achievement belonging to one earner. Maps to a Verifiable Credential as defined in the [[VC-DATA-MODEL]]. As described in [[[#data-integrity]]], at least one proof mechanism, and the details necessary to evaluate that proof, MUST be expressed for a credential to be a verifiable credential. In the case of an embedded proof, the credential MUST append the proof in the `proof` property.", + "description" : "AchievementCredentials are representations of an awarded achievement, used to share information about a achievement belonging to one earner. Maps to a Verifiable Credential as defined in the [[VC-DATA-MODEL-2.0]]. As described in [[[#data-integrity]]], at least one proof mechanism, and the details necessary to evaluate that proof, MUST be expressed for a credential to be a verifiable credential. In the case of an embedded proof, the credential MUST append the proof in the `proof` property.", "type" : "object", "properties" : { "@context" : { "type" : "array", - "minItems" : 1, - "items" : { + "minItems" : 2, + "items" : [ { + "enum" : [ "https://www.w3.org/ns/credentials/v2" ] + }, { + "type" : "string", + "pattern" : "^https:\\/\\/purl\\.imsglobal\\.org\\/spec\\/ob\\/v3p0\\/context(-3\\.\\d\\.\\d)*\\.json$" + } ], + "additionalItems" : { "$ref" : "#/$defs/Context" } }, @@ -18,13 +24,29 @@ "type" : "string" }, "type" : { - "type" : "array", - "minItems" : 1, - "items" : { - "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'AchievementCredential' or the URI 'OpenBadgeCredential'.", - "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" - } + "allOf" : [ { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "VerifiableCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'AchievementCredential' or the URI 'OpenBadgeCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + }, { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "AchievementCredential", "OpenBadgeCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'AchievementCredential' or the URI 'OpenBadgeCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + } ] }, "name" : { "description" : "The name of the credential for display purposes in wallets. For example, in a list of credentials and in detail views.", @@ -40,7 +62,7 @@ "$ref" : "#/$defs/Image" }, "awardedDate" : { - "description" : "Timestamp of when the credential was awarded. `issuanceDate` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `issuanceDate`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", + "description" : "Timestamp of when the credential was awarded. `validFrom` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `validFrom`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -72,14 +94,14 @@ "issuer" : { "$ref" : "#/$defs/Profile" }, - "issuanceDate" : { - "description" : "Timestamp of when the credential was issued.", + "validFrom" : { + "description" : "Timestamp of when the credential becomes valid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" }, - "expirationDate" : { - "description" : "If the credential has some notion of expiry, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered expired.", + "validUntil" : { + "description" : "If the credential has some notion of validity period, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered invalid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -109,7 +131,7 @@ } } }, - "required" : [ "@context", "id", "type", "name", "credentialSubject", "issuer", "issuanceDate" ], + "required" : [ "@context", "id", "type", "name", "credentialSubject", "issuer", "validFrom" ], "additionalProperties" : true, "$defs" : { "Context" : { @@ -161,7 +183,7 @@ "additionalProperties" : true }, "AchievementSubject" : { - "description" : "A collection of information about the recipient of an achievement. Maps to Credential Subject in [[VC-DATA-MODEL]].", + "description" : "A collection of information about the recipient of an achievement. Maps to Credential Subject in [[VC-DATA-MODEL-2.0]].", "type" : "object", "properties" : { "id" : { @@ -172,6 +194,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "AchievementSubject" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'AchievementSubject'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -247,7 +272,8 @@ "type" : { "description" : "MUST be the IRI 'IdentityObject'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "IdentityObject" ] }, "hashed" : { "description" : "Whether or not the `identityHash` value is hashed.", @@ -291,6 +317,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Evidence" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Evidence'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -332,19 +361,41 @@ "properties" : { "@context" : { "type" : "array", - "minItems" : 1, - "items" : { + "minItems" : 2, + "items" : [ { + "enum" : [ "https://www.w3.org/ns/credentials/v2" ] + }, { + "type" : "string", + "pattern" : "^https:\\/\\/purl\\.imsglobal\\.org\\/spec\\/ob\\/v3p0\\/context(-3\\.\\d\\.\\d)*\\.json$" + } ], + "additionalItems" : { "$ref" : "#/$defs/Context" } }, "type" : { - "type" : "array", - "minItems" : 1, - "items" : { - "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", - "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" - } + "allOf" : [ { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "VerifiableCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + }, { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "EndorsementCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + } ] }, "id" : { "description" : "Unambiguous reference to the credential.", @@ -365,7 +416,7 @@ "$ref" : "#/$defs/EndorsementSubject" }, "awardedDate" : { - "description" : "Timestamp of when the credential was awarded. `issuanceDate` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `issuanceDate`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", + "description" : "Timestamp of when the credential was awarded. `validFrom` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `validFrom`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -373,14 +424,14 @@ "issuer" : { "$ref" : "#/$defs/Profile" }, - "issuanceDate" : { - "description" : "Timestamp of when the credential was issued.", + "validFrom" : { + "description" : "Timestamp of when the credential becomes valid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" }, - "expirationDate" : { - "description" : "If the credential has some notion of expiry, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered expired.", + "validUntil" : { + "description" : "If the credential has some notion of validity period, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered invalid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -410,7 +461,7 @@ } } }, - "required" : [ "@context", "type", "id", "name", "credentialSubject", "issuer", "issuanceDate" ], + "required" : [ "@context", "type", "id", "name", "credentialSubject", "issuer", "validFrom" ], "additionalProperties" : true }, "Achievement" : { @@ -425,6 +476,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Achievement" ] + }, "items" : { "description" : "No description supplied.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -550,6 +604,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Alignment" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Alignment'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -621,7 +678,8 @@ "type" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'IdentifierEntry'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "IdentifierEntry" ] }, "identifier" : { "description" : "An identifier.", @@ -727,7 +785,8 @@ "type" : { "description" : "MUST be the IRI 'Image'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "Image" ] }, "caption" : { "description" : "The caption for the image.", @@ -750,8 +809,11 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "EndorsementSubject" ] + }, "items" : { - "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementSubject'.", + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'EndorsementSubject'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", "type" : "string" } @@ -772,6 +834,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Result" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Result'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -821,6 +886,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "ResultDescription" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'ResultDescription'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -899,6 +967,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "RubricCriterionLevel" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'RubricCriterionLevel'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -947,6 +1018,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Related" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Related'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -980,6 +1054,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Profile" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Profile'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -1098,6 +1175,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Address" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Address'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -1153,7 +1233,8 @@ "type" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'GeoCoordinates'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "GeoCoordinates" ] }, "latitude" : { "description" : "The latitude of the location [[WGS84]].", diff --git a/docs/schema/endorsementcredential.json b/docs/schema/endorsementcredential.json index eab378f8..e3f73ee1 100644 --- a/docs/schema/endorsementcredential.json +++ b/docs/schema/endorsementcredential.json @@ -7,19 +7,41 @@ "properties" : { "@context" : { "type" : "array", - "minItems" : 1, - "items" : { + "minItems" : 2, + "items" : [ { + "enum" : [ "https://www.w3.org/ns/credentials/v2" ] + }, { + "type" : "string", + "pattern" : "^https:\\/\\/purl\\.imsglobal\\.org\\/spec\\/ob\\/v3p0\\/context(-3\\.\\d\\.\\d)*\\.json$" + } ], + "additionalItems" : { "$ref" : "#/$defs/Context" } }, "type" : { - "type" : "array", - "minItems" : 1, - "items" : { - "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", - "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" - } + "allOf" : [ { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "VerifiableCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + }, { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "EndorsementCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + } ] }, "id" : { "description" : "Unambiguous reference to the credential.", @@ -40,7 +62,7 @@ "$ref" : "#/$defs/EndorsementSubject" }, "awardedDate" : { - "description" : "Timestamp of when the credential was awarded. `issuanceDate` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `issuanceDate`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", + "description" : "Timestamp of when the credential was awarded. `validFrom` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `validFrom`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -48,14 +70,14 @@ "issuer" : { "$ref" : "#/$defs/Profile" }, - "issuanceDate" : { - "description" : "Timestamp of when the credential was issued.", + "validFrom" : { + "description" : "Timestamp of when the credential becomes valid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" }, - "expirationDate" : { - "description" : "If the credential has some notion of expiry, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered expired.", + "validUntil" : { + "description" : "If the credential has some notion of validity period, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered invalid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -85,7 +107,7 @@ } } }, - "required" : [ "@context", "type", "id", "name", "credentialSubject", "issuer", "issuanceDate" ], + "required" : [ "@context", "type", "id", "name", "credentialSubject", "issuer", "validFrom" ], "additionalProperties" : true, "$defs" : { "Context" : { @@ -220,8 +242,11 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "EndorsementSubject" ] + }, "items" : { - "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementSubject'.", + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'EndorsementSubject'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", "type" : "string" } @@ -247,6 +272,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Profile" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Profile'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -364,19 +392,41 @@ "properties" : { "@context" : { "type" : "array", - "minItems" : 1, - "items" : { + "minItems" : 2, + "items" : [ { + "enum" : [ "https://www.w3.org/ns/credentials/v2" ] + }, { + "type" : "string", + "pattern" : "^https:\\/\\/purl\\.imsglobal\\.org\\/spec\\/ob\\/v3p0\\/context(-3\\.\\d\\.\\d)*\\.json$" + } ], + "additionalItems" : { "$ref" : "#/$defs/Context" } }, "type" : { - "type" : "array", - "minItems" : 1, - "items" : { - "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", - "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" - } + "allOf" : [ { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "VerifiableCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + }, { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "EndorsementCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + } ] }, "id" : { "description" : "Unambiguous reference to the credential.", @@ -397,7 +447,7 @@ "$ref" : "#/$defs/EndorsementSubject" }, "awardedDate" : { - "description" : "Timestamp of when the credential was awarded. `issuanceDate` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `issuanceDate`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", + "description" : "Timestamp of when the credential was awarded. `validFrom` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `validFrom`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -405,14 +455,14 @@ "issuer" : { "$ref" : "#/$defs/Profile" }, - "issuanceDate" : { - "description" : "Timestamp of when the credential was issued.", + "validFrom" : { + "description" : "Timestamp of when the credential becomes valid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" }, - "expirationDate" : { - "description" : "If the credential has some notion of expiry, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered expired.", + "validUntil" : { + "description" : "If the credential has some notion of validity period, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered invalid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -442,7 +492,7 @@ } } }, - "required" : [ "@context", "type", "id", "name", "credentialSubject", "issuer", "issuanceDate" ], + "required" : [ "@context", "type", "id", "name", "credentialSubject", "issuer", "validFrom" ], "additionalProperties" : true }, "IdentifierEntry" : { @@ -452,7 +502,8 @@ "type" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'IdentifierEntry'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "IdentifierEntry" ] }, "identifier" : { "description" : "An identifier.", @@ -486,7 +537,8 @@ "type" : { "description" : "MUST be the IRI 'Image'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "Image" ] }, "caption" : { "description" : "The caption for the image.", @@ -504,6 +556,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Address" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Address'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -559,7 +614,8 @@ "type" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'GeoCoordinates'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "GeoCoordinates" ] }, "latitude" : { "description" : "The latitude of the location [[WGS84]].", diff --git a/docs/schema/getopenbadgecredentialsresponse.json b/docs/schema/getopenbadgecredentialsresponse.json index 7cb1d9e1..e3730bba 100644 --- a/docs/schema/getopenbadgecredentialsresponse.json +++ b/docs/schema/getopenbadgecredentialsresponse.json @@ -25,13 +25,19 @@ "additionalProperties" : false, "$defs" : { "AchievementCredential" : { - "description" : "AchievementCredentials are representations of an awarded achievement, used to share information about a achievement belonging to one earner. Maps to a Verifiable Credential as defined in the [[VC-DATA-MODEL]]. As described in [[[#data-integrity]]], at least one proof mechanism, and the details necessary to evaluate that proof, MUST be expressed for a credential to be a verifiable credential. In the case of an embedded proof, the credential MUST append the proof in the `proof` property.", + "description" : "AchievementCredentials are representations of an awarded achievement, used to share information about a achievement belonging to one earner. Maps to a Verifiable Credential as defined in the [[VC-DATA-MODEL-2.0]]. As described in [[[#data-integrity]]], at least one proof mechanism, and the details necessary to evaluate that proof, MUST be expressed for a credential to be a verifiable credential. In the case of an embedded proof, the credential MUST append the proof in the `proof` property.", "type" : "object", "properties" : { "@context" : { "type" : "array", - "minItems" : 1, - "items" : { + "minItems" : 2, + "items" : [ { + "enum" : [ "https://www.w3.org/ns/credentials/v2" ] + }, { + "type" : "string", + "pattern" : "^https:\\/\\/purl\\.imsglobal\\.org\\/spec\\/ob\\/v3p0\\/context(-3\\.\\d\\.\\d)*\\.json$" + } ], + "additionalItems" : { "$ref" : "#/$defs/Context" } }, @@ -41,13 +47,29 @@ "type" : "string" }, "type" : { - "type" : "array", - "minItems" : 1, - "items" : { - "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'AchievementCredential' or the URI 'OpenBadgeCredential'.", - "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" - } + "allOf" : [ { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "VerifiableCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'AchievementCredential' or the URI 'OpenBadgeCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + }, { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "AchievementCredential", "OpenBadgeCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'AchievementCredential' or the URI 'OpenBadgeCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + } ] }, "name" : { "description" : "The name of the credential for display purposes in wallets. For example, in a list of credentials and in detail views.", @@ -63,7 +85,7 @@ "$ref" : "#/$defs/Image" }, "awardedDate" : { - "description" : "Timestamp of when the credential was awarded. `issuanceDate` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `issuanceDate`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", + "description" : "Timestamp of when the credential was awarded. `validFrom` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `validFrom`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -95,14 +117,14 @@ "issuer" : { "$ref" : "#/$defs/Profile" }, - "issuanceDate" : { - "description" : "Timestamp of when the credential was issued.", + "validFrom" : { + "description" : "Timestamp of when the credential becomes valid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" }, - "expirationDate" : { - "description" : "If the credential has some notion of expiry, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered expired.", + "validUntil" : { + "description" : "If the credential has some notion of validity period, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered invalid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -132,7 +154,7 @@ } } }, - "required" : [ "@context", "id", "type", "name", "credentialSubject", "issuer", "issuanceDate" ], + "required" : [ "@context", "id", "type", "name", "credentialSubject", "issuer", "validFrom" ], "additionalProperties" : true }, "Context" : { @@ -184,7 +206,7 @@ "additionalProperties" : true }, "AchievementSubject" : { - "description" : "A collection of information about the recipient of an achievement. Maps to Credential Subject in [[VC-DATA-MODEL]].", + "description" : "A collection of information about the recipient of an achievement. Maps to Credential Subject in [[VC-DATA-MODEL-2.0]].", "type" : "object", "properties" : { "id" : { @@ -195,6 +217,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "AchievementSubject" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'AchievementSubject'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -270,7 +295,8 @@ "type" : { "description" : "MUST be the IRI 'IdentityObject'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "IdentityObject" ] }, "hashed" : { "description" : "Whether or not the `identityHash` value is hashed.", @@ -314,6 +340,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Evidence" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Evidence'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -355,19 +384,41 @@ "properties" : { "@context" : { "type" : "array", - "minItems" : 1, - "items" : { + "minItems" : 2, + "items" : [ { + "enum" : [ "https://www.w3.org/ns/credentials/v2" ] + }, { + "type" : "string", + "pattern" : "^https:\\/\\/purl\\.imsglobal\\.org\\/spec\\/ob\\/v3p0\\/context(-3\\.\\d\\.\\d)*\\.json$" + } ], + "additionalItems" : { "$ref" : "#/$defs/Context" } }, "type" : { - "type" : "array", - "minItems" : 1, - "items" : { - "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", - "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" - } + "allOf" : [ { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "VerifiableCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + }, { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "EndorsementCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + } ] }, "id" : { "description" : "Unambiguous reference to the credential.", @@ -388,7 +439,7 @@ "$ref" : "#/$defs/EndorsementSubject" }, "awardedDate" : { - "description" : "Timestamp of when the credential was awarded. `issuanceDate` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `issuanceDate`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", + "description" : "Timestamp of when the credential was awarded. `validFrom` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `validFrom`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -396,14 +447,14 @@ "issuer" : { "$ref" : "#/$defs/Profile" }, - "issuanceDate" : { - "description" : "Timestamp of when the credential was issued.", + "validFrom" : { + "description" : "Timestamp of when the credential becomes valid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" }, - "expirationDate" : { - "description" : "If the credential has some notion of expiry, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered expired.", + "validUntil" : { + "description" : "If the credential has some notion of validity period, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered invalid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -433,7 +484,7 @@ } } }, - "required" : [ "@context", "type", "id", "name", "credentialSubject", "issuer", "issuanceDate" ], + "required" : [ "@context", "type", "id", "name", "credentialSubject", "issuer", "validFrom" ], "additionalProperties" : true }, "Achievement" : { @@ -448,6 +499,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Achievement" ] + }, "items" : { "description" : "No description supplied.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -573,6 +627,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Alignment" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Alignment'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -644,7 +701,8 @@ "type" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'IdentifierEntry'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "IdentifierEntry" ] }, "identifier" : { "description" : "An identifier.", @@ -750,7 +808,8 @@ "type" : { "description" : "MUST be the IRI 'Image'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "Image" ] }, "caption" : { "description" : "The caption for the image.", @@ -773,8 +832,11 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "EndorsementSubject" ] + }, "items" : { - "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementSubject'.", + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'EndorsementSubject'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", "type" : "string" } @@ -795,6 +857,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Result" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Result'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -844,6 +909,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "ResultDescription" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'ResultDescription'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -922,6 +990,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "RubricCriterionLevel" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'RubricCriterionLevel'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -970,6 +1041,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Related" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Related'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -1003,6 +1077,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Profile" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Profile'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -1121,6 +1198,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Address" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Address'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -1176,7 +1256,8 @@ "type" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'GeoCoordinates'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "GeoCoordinates" ] }, "latitude" : { "description" : "The latitude of the location [[WGS84]].", diff --git a/docs/schema/profile.json b/docs/schema/profile.json index 193800d1..3bfb9ea1 100644 --- a/docs/schema/profile.json +++ b/docs/schema/profile.json @@ -13,6 +13,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Profile" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Profile'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -130,19 +133,41 @@ "properties" : { "@context" : { "type" : "array", - "minItems" : 1, - "items" : { + "minItems" : 2, + "items" : [ { + "enum" : [ "https://www.w3.org/ns/credentials/v2" ] + }, { + "type" : "string", + "pattern" : "^https:\\/\\/purl\\.imsglobal\\.org\\/spec\\/ob\\/v3p0\\/context(-3\\.\\d\\.\\d)*\\.json$" + } ], + "additionalItems" : { "$ref" : "#/$defs/Context" } }, "type" : { - "type" : "array", - "minItems" : 1, - "items" : { - "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", - "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" - } + "allOf" : [ { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "VerifiableCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + }, { + "type" : "array", + "minItems" : 1, + "contains" : { + "enum" : [ "EndorsementCredential" ] + }, + "items" : { + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementCredential'.", + "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", + "type" : "string" + } + } ] }, "id" : { "description" : "Unambiguous reference to the credential.", @@ -163,7 +188,7 @@ "$ref" : "#/$defs/EndorsementSubject" }, "awardedDate" : { - "description" : "Timestamp of when the credential was awarded. `issuanceDate` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `issuanceDate`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", + "description" : "Timestamp of when the credential was awarded. `validFrom` is used to determine the most recent version of a Credential in conjunction with `issuer` and `id`. Consequently, the only way to update a Credental is to update the `validFrom`, losing the date when the Credential was originally awarded. `awardedDate` is meant to keep this original date.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -171,14 +196,14 @@ "issuer" : { "$ref" : "#/$defs/Profile" }, - "issuanceDate" : { - "description" : "Timestamp of when the credential was issued.", + "validFrom" : { + "description" : "Timestamp of when the credential becomes valid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" }, - "expirationDate" : { - "description" : "If the credential has some notion of expiry, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered expired.", + "validUntil" : { + "description" : "If the credential has some notion of validity period, this indicates a timestamp when a credential should no longer be considered valid. After this time, the credential should be considered invalid.", "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`", "type" : "string", "format" : "date-time" @@ -208,7 +233,7 @@ } } }, - "required" : [ "@context", "type", "id", "name", "credentialSubject", "issuer", "issuanceDate" ], + "required" : [ "@context", "type", "id", "name", "credentialSubject", "issuer", "validFrom" ], "additionalProperties" : true }, "Context" : { @@ -266,7 +291,8 @@ "type" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'IdentifierEntry'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "IdentifierEntry" ] }, "identifier" : { "description" : "An identifier.", @@ -372,7 +398,8 @@ "type" : { "description" : "MUST be the IRI 'Image'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "Image" ] }, "caption" : { "description" : "The caption for the image.", @@ -395,8 +422,11 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "EndorsementSubject" ] + }, "items" : { - "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'VerifiableCredential', and one of the items MUST be the URI 'EndorsementSubject'.", + "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the URI 'EndorsementSubject'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", "type" : "string" } @@ -417,6 +447,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Address" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Address'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", @@ -472,7 +505,8 @@ "type" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'GeoCoordinates'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).", - "type" : "string" + "type" : "string", + "enum" : [ "GeoCoordinates" ] }, "latitude" : { "description" : "The latitude of the location [[WGS84]].", @@ -500,6 +534,9 @@ "type" : { "type" : "array", "minItems" : 1, + "contains" : { + "enum" : [ "Profile" ] + }, "items" : { "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Profile'.", "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).",