From c56398ae4bdce0c72449c07ddde6d92130a66791 Mon Sep 17 00:00:00 2001 From: Oriol Lopez-Doriga Date: Tue, 11 Jun 2024 12:45:34 +0200 Subject: [PATCH] adding optional booleanSets and countSets responses --- .../json/responses/beaconBooleanResponse.json | 4 ++ .../json/responses/beaconCountResponse.json | 4 ++ .../responses/sections/beaconBooleansets.json | 55 +++++++++++++++++ .../responses/sections/beaconCountsets.json | 60 +++++++++++++++++++ 4 files changed, 123 insertions(+) create mode 100644 framework/json/responses/sections/beaconBooleansets.json create mode 100644 framework/json/responses/sections/beaconCountsets.json diff --git a/framework/json/responses/beaconBooleanResponse.json b/framework/json/responses/beaconBooleanResponse.json index 7aae7ffe6..c11b6c709 100644 --- a/framework/json/responses/beaconBooleanResponse.json +++ b/framework/json/responses/beaconBooleanResponse.json @@ -14,6 +14,10 @@ "$ref": "./sections/beaconResponseMeta.json", "description": "Information about the response that could be relevant for the Beacon client in order to interpret the results." }, + "response": { + "$ref": "./sections/beaconBooleansets.json", + "description": "Response for queries that recovers any result." + }, "responseSummary": { "$ref": "./sections/beaconBooleanResponseSection.json", "description": "Boolean (true/false) response section." diff --git a/framework/json/responses/beaconCountResponse.json b/framework/json/responses/beaconCountResponse.json index 7c5b1ad46..13f27dfa1 100644 --- a/framework/json/responses/beaconCountResponse.json +++ b/framework/json/responses/beaconCountResponse.json @@ -14,6 +14,10 @@ "$ref": "./sections/beaconResponseMeta.json", "description": "Information about the response that could be relevant for the Beacon client in order to interpret the results." }, + "response": { + "$ref": "./sections/beaconCountsets.json", + "description": "Response for queries that recovers any result." + }, "responseSummary": { "$ref": "./sections/beaconCountResponseSection.json", "description": "Response summary, including Boolean and optionally results count." diff --git a/framework/json/responses/sections/beaconBooleansets.json b/framework/json/responses/sections/beaconBooleansets.json new file mode 100644 index 000000000..b1530028c --- /dev/null +++ b/framework/json/responses/sections/beaconBooleansets.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": true, + "definitions": { + "BooleansetInstance": { + "additionalProperties": true, + "properties": { + "exists": { + "type": "boolean" + }, + "id": { + "description": "id of the Booleanset", + "example": "datasetA", + "type": "string" + }, + "info": { + "description": "Additional details that could be of interest about the Booleanset. Provided to clearly enclose any attribute that is not part of the Beacon specification.", + "type": "object" + }, + "resultsHandovers": { + "$ref": "../../common/beaconCommonComponents.json#/definitions/ListOfHandovers", + "description": "List of handovers that apply to this Booleanset, not to the whole Beacon or to a result in particular." + }, + "setType": { + "default": "dataset", + "description": "Entry type of Booleanset. It SHOULD MATCH an entry type declared as collection in the Beacon configuration.", + "type": "string" + } + }, + "required": [ + "id", + "setType", + "exists" + ] + } + }, + "description": "Sets of results to be returned as query response.", + "properties": { + "$schema": { + "$ref": "../../common/beaconCommonComponents.json#/definitions/$schema" + }, + "booleanSets": { + "items": { + "$ref": "#/definitions/BooleansetInstance" + }, + "minItems": 0, + "type": "array" + } + }, + "required": [ + "booleanSets" + ], + "title": "Beacon BooleanSet", + "type": "object" +} \ No newline at end of file diff --git a/framework/json/responses/sections/beaconCountsets.json b/framework/json/responses/sections/beaconCountsets.json new file mode 100644 index 000000000..b40cb9f3c --- /dev/null +++ b/framework/json/responses/sections/beaconCountsets.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": true, + "definitions": { + "CountsetInstance": { + "additionalProperties": true, + "properties": { + "exists": { + "type": "boolean" + }, + "id": { + "description": "id of the Countset", + "example": "datasetA", + "type": "string" + }, + "info": { + "description": "Additional details that could be of interest about the Countset. Provided to clearly enclose any attribute that is not part of the Beacon specification.", + "type": "object" + }, + "resultsCount": { + "description": "Number of results in this Countset.", + "type": "integer" + }, + "resultsHandovers": { + "$ref": "../../common/beaconCommonComponents.json#/definitions/ListOfHandovers", + "description": "List of handovers that apply to this Countset, not to the whole Beacon or to a result in particular." + }, + "setType": { + "default": "dataset", + "description": "Entry type of Countset. It SHOULD MATCH an entry type declared as collection in the Beacon configuration.", + "type": "string" + } + }, + "required": [ + "id", + "setType", + "exists", + "resultsCount" + ] + } + }, + "description": "Sets of results to be returned as query response.", + "properties": { + "$schema": { + "$ref": "../../common/beaconCommonComponents.json#/definitions/$schema" + }, + "countSets": { + "items": { + "$ref": "#/definitions/CountsetInstance" + }, + "minItems": 0, + "type": "array" + } + }, + "required": [ + "countSets" + ], + "title": "Beacon CountSet", + "type": "object" +} \ No newline at end of file