UNPKG

@blockcerts/schemas

Version:
75 lines (74 loc) 2.41 kB
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Blockchain Certificates Version 1.2 Schema", "id": "https://w3id.org/blockcerts/schema/1.2/blockchain-certificate-1.2.json", "description": "A schema for representing certificates on the blockchain", "type": "object", "definitions": { "JsonLdContext": { "description": "A link to a valid JSON-LD context file, that maps term names to contexts. Blockchain Certificate contexts may also define JSON-schema to validate Blockchain Certificates against. In a Blockchain Certificate Object, this will almost always be a string:uri to a single context file, but might rarely be an array of links or context objects instead. This schema also allows direct mapping of terms to IRIs by using an object as an option within an array.", "oneOf": [ { "type": "string" }, { "type": "array", "items": { "oneOf": [ { "type": "string" }, { "type": "object" }, { "type": "array" } ] } } ] }, "JsonLdType": { "description": "A type or an array of types that the Blockchain Certificate object represents. The first or only item should be 'BlockchainCertificate', and any others should each be an IRI (usually a URL) corresponding to a definition of the type itself. In almost all cases, there will be only one type: 'BlockchainCertificate'", "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "CertificateDocument": { "$ref": "https://w3id.org/blockcerts/schema/1.2/certificate-document-1.2.json" }, "BlockchainReceipt": { "$ref": "https://w3id.org/blockcerts/schema/1.2/blockchain-receipt-1.2.json" } }, "properties": { "@context": { "$ref": "#/definitions/JsonLdContext" }, "type": { "$ref": "#/definitions/JsonLdType" }, "document": { "$ref": "#/definitions/CertificateDocument" }, "receipt": { "$ref": "#/definitions/BlockchainReceipt" } }, "required": [ "@context", "type", "document", "receipt" ], "additionalProperties": true }