Skip to content

Instantly share code, notes, and snippets.

@ilya-korotya
Created July 18, 2024 14:22
Show Gist options
  • Save ilya-korotya/0edb694e0a82a238c14713e1d8bcd789 to your computer and use it in GitHub Desktop.
Save ilya-korotya/0edb694e0a82a238c14713e1d8bcd789 to your computer and use it in GitHub Desktop.
PrivatelyAge json schema
{
"$metadata": {
"uris": {
"jsonLdContext": "https://gist.githubusercontent.com/ilya-korotya/3e90c9102e212c3152efb48661cb1536/raw/66351d25d9903b91394c538d7603cca9ea6fca4e/PrivatelyAge.jsonld"
},
"version": "1.0",
"type": "PrivatelyAge"
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "PrivatelyAge",
"title": "PrivatelyAge",
"properties": {
"credentialSubject": {
"description": "Stores the data of the credential",
"title": "Credential subject",
"properties": {
"id": {
"description": "Stores the DID of the subject that owns the credential",
"title": "Credential subject ID",
"format": "uri",
"type": "string"
},
"age": {
"description": "User age",
"title": "age",
"type": "integer"
},
"gate": {
"description": "User gate",
"title": "gate",
"type": "integer"
}
},
"required": [
"age",
"gate"
],
"type": "object"
},
"@context": {
"type": [
"string",
"array",
"object"
]
},
"expirationDate": {
"format": "date-time",
"type": "string"
},
"id": {
"type": "string"
},
"issuanceDate": {
"format": "date-time",
"type": "string"
},
"issuer": {
"type": [
"string",
"object"
],
"format": "uri",
"properties": {
"id": {
"format": "uri",
"type": "string"
}
},
"required": [
"id"
]
},
"type": {
"type": [
"string",
"array"
],
"items": {
"type": "string"
}
},
"credentialSchema": {
"properties": {
"id": {
"format": "uri",
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"id",
"type"
],
"type": "object"
},
"credentialStatus": {
"description": "Allows the discovery of information about the current status of the credential, such as whether it is suspended or revoked.",
"title": "Credential Status",
"properties": {
"id": {
"description": "Id URL of the credentialStatus.",
"title": "Id",
"format": "uri",
"type": "string"
},
"type": {
"description": "Expresses the credential status type (method). The value should provide enough information to determine the current status of the credential.",
"title": "Type",
"type": "string"
}
},
"required": [
"id",
"type"
],
"type": "object"
}
},
"required": [
"credentialSubject",
"@context",
"id",
"issuanceDate",
"issuer",
"type",
"credentialSchema"
],
"type": "object"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment