From f83b2c88fc76c236f664435969fb1aaea755449d Mon Sep 17 00:00:00 2001 From: Christian Autermann Date: Fri, 13 Dec 2024 11:08:03 +0100 Subject: [PATCH] Add example of image observation using the data URI scheme (resolves #83) (#97) --- .../examples/observations/obs-link-inline-image.json | 12 ++++++++++++ api/part2/openapi/responses/observation.yaml | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 api/part2/openapi/examples/observations/obs-link-inline-image.json diff --git a/api/part2/openapi/examples/observations/obs-link-inline-image.json b/api/part2/openapi/examples/observations/obs-link-inline-image.json new file mode 100644 index 00000000..ec9d79f5 --- /dev/null +++ b/api/part2/openapi/examples/observations/obs-link-inline-image.json @@ -0,0 +1,12 @@ +{ + "id": "fefaig45w46v5186d6w", + "datastream@id": "f44f85rrt", + "foi@id": "55f48g48th", + "phenomenonTime": "2023-04-03T18:45:23Z", + "resultTime": "2023-04-03T18:45:23Z", + "result@link": { + "href": "data:image/png;base64,dGhlIGltYWdlIGFzIGJhc2U2NAo=", + "title": "Inline PNG image", + "type": "image/png" + } +} diff --git a/api/part2/openapi/responses/observation.yaml b/api/part2/openapi/responses/observation.yaml index fa2812a2..f2001466 100644 --- a/api/part2/openapi/responses/observation.yaml +++ b/api/part2/openapi/responses/observation.yaml @@ -28,6 +28,10 @@ content: summary: Observation with link to external result value: $ref: ../examples/observations/obs-link.json + inline-image: + summary: Observation with an PNG image encoded using the data URI schema + value: + $ref: ../examples/observations/obs-link-inline-image.json application/swe+json: schema: