ex-protocol.2.0.1.source-code.resource.schema.json Maven / Gradle / Ivy
The newest version!
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://tbdex.dev/resource.schema.json",
"type": "object",
"additionalProperties": false,
"properties": {
"metadata": {
"type": "object",
"properties": {
"from": {
"$ref": "definitions.json#/definitions/did",
"description": "The PFI's DID"
},
"kind": {
"type": "string",
"enum": ["offering", "balance"],
"description": "The resource kind (e.g. Offering)"
},
"id": {
"type": "string",
"description": "The resource id"
},
"createdAt": {
"type": "string",
"description": "When the resource was created at. Expressed as ISO8601"
},
"updatedAt": {
"type": "string",
"description": "When the resource was last updated. Expressed as ISO8601"
},
"protocol": {
"type": "string",
"description": "Version of the protocol in use (x.x format)"
}
},
"required": ["from", "kind", "id", "createdAt", "protocol"],
"description": "The metadata object contains fields about the resource and is present for every tbdex resources of all types."
},
"data": {
"description": "The actual resource content",
"type": "object"
},
"signature": {
"type": "string",
"description": "Signature that verifies that authenticity and integrity of a message"
}
},
"required": ["metadata", "data", "signature"],
"description": "ResourceModel"
}