{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/baloise/main/json-schema/baloise-document-schema.json", "title": "Document", "x-generated": "2026-10-09", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/baloise-corellia-contracts-openapi.yml#/components/schemas/Document", "required": [ "contractId", "data", "documentType", "fileName", "mediaType" ], "type": "object", "properties": { "data": { "type": "array", "description": "The document itself. If the documentType is CONTRACT then the document must contain one of these keywords 'Versicherungsvertrag, Contrat d’assurance, Contratto di assicurazione, Insurance policy'", "items": { "type": "string", "format": "byte" } }, "contractId": { "maxLength": 20, "minLength": 0, "type": "string", "description": "The contract this document belongs to" }, "mediaType": { "type": "string", "description": "Accepted media types for documents represented by data byte[]", "enum": [ "APPLICATION_PDF", "IMAGE_JPEG", "IMAGE_TIFF", "IMAGE_PNG", "IMAGE_BMP", "IMAGE_GIF" ] }, "fileName": { "maxLength": 256, "minLength": 0, "type": "string" }, "documentType": { "type": "string", "enum": [ "CONTRACT", "RECEIPT", "COVER_LETTER" ] } } }