{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://gematik.de/ti-m/structuredData.json", "title": "Structured data event", "description": "Schema for structured data events.", "type": "object", "properties": { "type": { "description": "The event type. MUST use Java package naming convention.", "type": "string", "examples": ["de.wald-krankenhaus.notfalleinsatzprotokoll"] }, "content": { "description": "The event content.", "type": "object", "properties": { "de.gematik.text": { "description": "An ordered array of textual representations in different mimetypes to be used as fallback by clients that don't understand the event otherwise. Senders MUST specify at least one representation and MUST always include a plaintext representation. Receivers SHOULD use the first representation in the array that they understand.", "type": "array", "items": { "type": "object", "properties": { "mimetype": { "description": "The mimetype. Defaults to `text/plain` if omitted.", "type": "string", "examples": ["text/html"] }, "body": { "description": "The string content. Clients SHOULD validate and sanitize the content as they do for rich content associated with `msgtype` of `m.room.message`.", "type": "string" } }, "required": ["body"] }, "minItems": 1 }, "de.gematik.file": { "description": "A file representation to be used as fallback by clients that don't understand the event otherwise.", "type": "object", "properties": { "url": { "description": "The `mxc://` URI for the file.", "type": "string", "pattern": "^mxc://.*" }, "name": { "description": "Name of the file including extension (if applicable).", "type": "string" }, "mimetype": { "description": "The file's mimetype. Optional but RECOMMENDED.", "type": "string", "examples": ["application/pdf"] }, "size": { "description": "The file's size in bytes. Optional but RECOMMENDED.", "type": "integer", "minimum": 0 }, "key": { "description": "A JSON Web Key object as per the `EncryptedFile` type in `m.room.message`. REQUIRED if the file is encrypted.", "type": "object" }, "iv": { "description": "The 128-bit initialization vector as per the `EncryptedFile` type in `m.room.message`. REQUIRED if the file is encrypted.", "type": "string" }, "hashes": { "description": "A map from an algorithm name to a hash of the ciphertext, encoded as unpadded base64 as per the `EncryptedFile` type in `m.room.message`. REQUIRED if the file is encrypted.", "type": "object" }, "v": { "description": "Version of the encrypted attachments protocol as per the `EncryptedFile` type in `m.room.message`. REQUIRED if the file is encrypted.", "type": "string" } }, "required": ["url", "name"] } }, "additionalProperties": true, "required": ["de.gematik.text"] } }, "required": ["type", "content"] }