diff --git a/Common/AttachmentRef.schema.json b/Common/AttachmentRef.schema.json index bab73a54..ef85e483 100644 --- a/Common/AttachmentRef.schema.json +++ b/Common/AttachmentRef.schema.json @@ -25,10 +25,6 @@ "description": "Link to the attachment media/content", "type": "string", "format": "uri" - }, - "@referredType": { - "type": "string", - "description": "The actual type of the target instance when needed for disambiguation." } }, "allOf": [ diff --git a/Common/AttachmentRefOrValue.schema.json b/Common/AttachmentRefOrValue.schema.json index caa6f644..1978900a 100644 --- a/Common/AttachmentRefOrValue.schema.json +++ b/Common/AttachmentRefOrValue.schema.json @@ -4,63 +4,29 @@ "title": "AttachmentRefOrValue", "definitions": { "AttachmentRefOrValue": { - "type": "object", + "discriminator": "isRef", + "$id": "#AttachmentRefOrValue", "description": "An attachment by value or by reference.", + "type": "object", "properties": { - "@referredType": { - "type": "string", - "description": "The actual type of the target instance when needed for disambiguation." - }, - "description": { - "type": "string", - "description": "A narrative text describing the content of the attachment" - }, - "href": { - "type": "string", - "description": "URI for this Attachment" - }, - "id": { - "type": "string", - "description": "Unique identifier for this particular attachment" - }, - "url": { - "type": "string", - "description": "Uniform Resource Locator, is a web page address (a subset of URI)" - }, - "name": { - "type": "string", - "description": "The name of the attachment" - }, - "attachmentType": { - "type": "string", - "description": "Attachment type such as video, picture" - }, - "mimeType": { - "type": "string", - "description": "Attachment mime type such as extension file for video, picture and document" - }, - "isRef": { - "type": "boolean", - "default": true - }, - "content": { - "$ref": "ContentType.schema.json#/definitions/ContentType", - "description": "The file itself when provided." - }, - "size": { - "$ref": "Quantity.schema.json#/definitions/Quantity", - "description": "The size of the attachment." - }, - "validFor": { - "$ref": "TimePeriod.schema.json#/definitions/TimePeriod", - "description": "The period of time for which the attachment is valid" - } + "isRef": { + "type": "boolean", + "default": true + + } }, + "required": [ + "role" + ], "allOf": [ { - "$ref": "Entity.schema.json#/Entity" + "$ref": "AttachmentRef.schema.json#AttachmentRef" + }, + { + "$ref": "Attachment.schema.json#Attachment" } + ] } } -} \ No newline at end of file + } \ No newline at end of file