From 71325707542e0dce9d402aaa01d9d63026f0491c Mon Sep 17 00:00:00 2001 From: Christian Autermann Date: Fri, 13 Dec 2024 14:49:59 +0100 Subject: [PATCH] Add missing schema files for part 2 (closes #81) (#95) --- .../openapi/examples/events/systemEvent.json | 21 +++++++++++++++++++ .../parameters/controlStreamIdList.yaml | 10 +++++++++ .../openapi/parameters/dataStreamIdList.yaml | 10 +++++++++ api/part2/openapi/paths/commands.yaml | 2 +- api/part2/openapi/paths/observations.yaml | 2 +- api/part2/openapi/paths/systemEventById.yaml | 2 +- api/part2/openapi/responses/systemEvent.yaml | 2 +- 7 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 api/part2/openapi/examples/events/systemEvent.json create mode 100644 api/part2/openapi/parameters/controlStreamIdList.yaml create mode 100644 api/part2/openapi/parameters/dataStreamIdList.yaml diff --git a/api/part2/openapi/examples/events/systemEvent.json b/api/part2/openapi/examples/events/systemEvent.json new file mode 100644 index 00000000..c410bf76 --- /dev/null +++ b/api/part2/openapi/examples/events/systemEvent.json @@ -0,0 +1,21 @@ +{ + "id": "e5ce3b97-0fe2-4f92-a631-4bba0bd82fb1", + "label": "Deployment", + "definition": "https://vocab.nerc.ac.uk/collection/W03/current/W030002/", + "time": "2015-10-12T12:02:00.000Z", + "documentation": [ + { + "name": "log", + "link": { + "href": "http://trios.de/lisa3075_installation.log" + } + } + ], + "links": [ + { + "href": "https://data.example.com/link/to/resource", + "type": "application/json", + "title": "Resource Name" + } + ] +} diff --git a/api/part2/openapi/parameters/controlStreamIdList.yaml b/api/part2/openapi/parameters/controlStreamIdList.yaml new file mode 100644 index 00000000..dbce538b --- /dev/null +++ b/api/part2/openapi/parameters/controlStreamIdList.yaml @@ -0,0 +1,10 @@ + +name: controlStream +description: |- + List of control stream local IDs or unique IDs (URI). + Only resources that are associated to a control stream that has one of the provided identifiers are selected. +in: query +required: false +schema: + $ref: ../../../part1/openapi/parameters/idListSchema.yaml +explode: false \ No newline at end of file diff --git a/api/part2/openapi/parameters/dataStreamIdList.yaml b/api/part2/openapi/parameters/dataStreamIdList.yaml new file mode 100644 index 00000000..1540b877 --- /dev/null +++ b/api/part2/openapi/parameters/dataStreamIdList.yaml @@ -0,0 +1,10 @@ + +name: dataStream +description: |- + List of data stream local IDs or unique IDs (URI). + Only resources that are associated to a data stream that has one of the provided identifiers are selected. +in: query +required: false +schema: + $ref: ../../../part1/openapi/parameters/idListSchema.yaml +explode: false \ No newline at end of file diff --git a/api/part2/openapi/paths/commands.yaml b/api/part2/openapi/paths/commands.yaml index 5c348915..d336a9ac 100644 --- a/api/part2/openapi/paths/commands.yaml +++ b/api/part2/openapi/paths/commands.yaml @@ -10,7 +10,7 @@ get: - $ref: ../parameters/executionTime.yaml - $ref: ../parameters/statusCodeList.yaml - $ref: ../parameters/senderList.yaml - - $ref: ../../../part1/openapi/parameters/controlStreamIdList.yaml + - $ref: ../parameters/controlStreamIdList.yaml - $ref: ../../../part1/openapi/parameters/systemIdList.yaml - $ref: ../../../part1/openapi/parameters/foiIdList.yaml - $ref: ../../../part1/openapi/parameters/controlPropIdList.yaml diff --git a/api/part2/openapi/paths/observations.yaml b/api/part2/openapi/paths/observations.yaml index f5546498..023ef8e4 100644 --- a/api/part2/openapi/paths/observations.yaml +++ b/api/part2/openapi/paths/observations.yaml @@ -8,7 +8,7 @@ get: - $ref: ../../../part1/openapi/parameters/idList.yaml - $ref: ../parameters/phenomenonTime.yaml - $ref: ../parameters/resultTime.yaml - - $ref: ../../../part1/openapi/parameters/dataStreamIdList.yaml + - $ref: ../parameters/dataStreamIdList.yaml - $ref: ../../../part1/openapi/parameters/systemIdList.yaml - $ref: ../../../part1/openapi/parameters/foiIdList.yaml - $ref: ../../../part1/openapi/parameters/obsPropIdList.yaml diff --git a/api/part2/openapi/paths/systemEventById.yaml b/api/part2/openapi/paths/systemEventById.yaml index 708ce83b..1e38da70 100644 --- a/api/part2/openapi/paths/systemEventById.yaml +++ b/api/part2/openapi/paths/systemEventById.yaml @@ -1,5 +1,5 @@ parameters: - - $ref: ../parameters/systemId.yaml + - $ref: ../../../part1/openapi/parameters/systemId.yaml - $ref: ../parameters/eventId.yaml get: diff --git a/api/part2/openapi/responses/systemEvent.yaml b/api/part2/openapi/responses/systemEvent.yaml index 8ce3b4bd..9ca50f77 100644 --- a/api/part2/openapi/responses/systemEvent.yaml +++ b/api/part2/openapi/responses/systemEvent.yaml @@ -11,4 +11,4 @@ content: simple: summary: Scalar Observation (Measure) value: - $ref: ../examples/events/datastream-added.json \ No newline at end of file + $ref: ../examples/events/systemEvent.json \ No newline at end of file