From 244206d2792fedaf3117209854c8e7a0bb351b2d Mon Sep 17 00:00:00 2001 From: Richard Olvera Date: Wed, 19 Jun 2024 09:40:50 +0200 Subject: [PATCH 1/2] add attachment metadata image --- common/schemas/Attachment.openapi.yaml | 69 ++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/common/schemas/Attachment.openapi.yaml b/common/schemas/Attachment.openapi.yaml index 800a0e8..6d80c36 100644 --- a/common/schemas/Attachment.openapi.yaml +++ b/common/schemas/Attachment.openapi.yaml @@ -80,3 +80,72 @@ components: type: string readOnly: true example: 8cf1bc0fca7f4158b8eb807be15fd7fd21bfe52d956ce3ede1511671c97dad61 + + AttachmentImage: + allOf: + - $ref: "./Attachment.openapi.yaml#/components/schemas/Attachment" + - properties: + "@type": + default: AttachmentImage + example: AttachmentImage + width: + description: The width of the image in pixels. + type: integer + format: int64 + example: 800 + readOnly: true + height: + description: The height of the image in pixels. + type: integer + format: int64 + example: 600 + readOnly: true + resolution: + description: The resolution of the image in DPI. + type: integer + format: int64 + example: 72 + readOnly: true + colorDepth: + description: The color depth of the image in bits. + type: integer + format: int64 + example: 24 + readOnly: true + thumbnail: + description: The thumbnail of the image. + type: string + format: base64 + readOnly: true + thumbnailWidth: + description: The width of the thumbnail in pixels. + type: integer + format: int64 + example: 80 + readOnly: true + thumbnailHeight: + description: The height of the thumbnail in pixels. + type: integer + format: int64 + example: 60 + readOnly: true + geoLocation: + description: The geo location of the image. + readOnly: true + allOf: + - $ref: "./GeographicPoint.openapi.yaml#/components/schemas/GeographicPoint" + exif: + description: The EXIF data of the image. + type: object + readOnly: true + additionalProperties: + type: string + example: + { + "Make": "Canon", + "Model": "Canon EOS 5D Mark III", + "ExposureTime": "1/60", + "FNumber": "f/4.0", + "ISOSpeedRatings": 3200, + "DateTimeOriginal": "2019-12-31T23:59:59Z", + } From c0a224eec17cada3cec349144a0937ee2a4c7eee Mon Sep 17 00:00:00 2001 From: Richard Olvera Date: Fri, 4 Oct 2024 12:01:13 +0200 Subject: [PATCH 2/2] add discriminator attachment --- common/schemas/Attachment.openapi.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/schemas/Attachment.openapi.yaml b/common/schemas/Attachment.openapi.yaml index 6d80c36..2cf0f3b 100644 --- a/common/schemas/Attachment.openapi.yaml +++ b/common/schemas/Attachment.openapi.yaml @@ -18,6 +18,11 @@ components: - required: - name - "@type" + discriminator: + propertyName: "@type" + mapping: + Attachment: "#/components/schemas/Attachment" + AttachmentImage: "#/components/schemas/AttachmentImage" properties: id: type: string