From 0b6ce39100eb091b3ea6eb0efaba37b7546beada Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Wed, 3 Jul 2019 11:06:45 +0000 Subject: [PATCH 1/2] Live corrections AttachmentRef and AttachmentRefOrValue --- Common/AttachmentRef.schema.json | 4 ---- Common/AttachmentRefOrValue.schema.json | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) 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..fa95e9ce 100644 --- a/Common/AttachmentRefOrValue.schema.json +++ b/Common/AttachmentRefOrValue.schema.json @@ -44,8 +44,9 @@ "default": true }, "content": { - "$ref": "ContentType.schema.json#/definitions/ContentType", - "description": "The file itself when provided." + "type": "string", + "format": "base64", + "description": "The actual contents of the attachment object, if embedded, encoded as base64" }, "size": { "$ref": "Quantity.schema.json#/definitions/Quantity", From 101d1f3f18367f334bb9e6f40fff8ebd1ccc920d Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Wed, 3 Jul 2019 11:17:51 +0000 Subject: [PATCH 2/2] fix attRefOrValue --- Common/AttachmentRefOrValue.schema.json | 69 ++++++------------------- 1 file changed, 17 insertions(+), 52 deletions(-) diff --git a/Common/AttachmentRefOrValue.schema.json b/Common/AttachmentRefOrValue.schema.json index fa95e9ce..1978900a 100644 --- a/Common/AttachmentRefOrValue.schema.json +++ b/Common/AttachmentRefOrValue.schema.json @@ -4,64 +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": { - "type": "string", - "format": "base64", - "description": "The actual contents of the attachment object, if embedded, encoded as base64" - }, - "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