diff --git a/framework/json/responses/beaconResultsetsResponse.json b/framework/json/responses/beaconResultsetsResponse.json index f2239a57..159fadaa 100644 --- a/framework/json/responses/beaconResultsetsResponse.json +++ b/framework/json/responses/beaconResultsetsResponse.json @@ -16,20 +16,8 @@ "description": "Information about the response that could be relevant for the Beacon client in order to interpret the results." }, "response": { - "oneOf": [ - { - "$ref": "./sections/beaconResultsets.json", - "description": "Response for queries that recovers any result." - }, - { - "$ref": "./sections/beaconCountResultsets.json", - "description": "Response for queries that recovers any result." - }, - { - "$ref": "./sections/beaconBooleanResultsets.json", - "description": "Response for queries that recovers any result." - } - ] + "$ref": "./sections/beaconResultsets.json", + "description": "Response for queries that recovers any result." }, "responseSummary": { "$ref": "./sections/beaconSummaryResponseSection.json", diff --git a/framework/json/responses/sections/beaconResultsets.json b/framework/json/responses/sections/beaconResultsets.json index 6ddeb3a8..7a9d89da 100644 --- a/framework/json/responses/sections/beaconResultsets.json +++ b/framework/json/responses/sections/beaconResultsets.json @@ -5,6 +5,7 @@ "ResultsetInstance": { "additionalProperties": true, "properties": { + "returnedGranularity": { "const": "record" }, "exists": { "type": "boolean" }, @@ -45,6 +46,77 @@ "resultsCount", "results" ] + }, + "CountResultsetInstance": { + "additionalProperties": true, + "properties": { + "returnedGranularity": { "const": "count" }, + "exists": { + "type": "boolean" + }, + "id": { + "description": "id of the CountResultset", + "example": "datasetA", + "type": "string" + }, + "info": { + "description": "Additional details that could be of interest about the CountResultset. Provided to clearly enclose any attribute that is not part of the Beacon specification.", + "type": "object" + }, + "resultsCount": { + "description": "Number of results in this CountResultset.", + "type": "integer" + }, + "resultsHandovers": { + "$ref": "../../common/beaconCommonComponents.json#/definitions/ListOfHandovers", + "description": "List of handovers that apply to this CountResultset, not to the whole Beacon or to a result in particular." + }, + "setType": { + "default": "dataset", + "description": "Entry type of CountResultset. It SHOULD MATCH an entry type declared as collection in the Beacon configuration.", + "type": "string" + } + }, + "required": [ + "returnedGranularity", + "id", + "setType", + "exists", + "resultsCount" + ] + }, + "BooleanResultsetInstance": { + "additionalProperties": true, + "properties": { + "returnedGranularity": { "const": "boolean" }, + "exists": { + "type": "boolean" + }, + "id": { + "description": "id of the BooleanResultset", + "example": "datasetA", + "type": "string" + }, + "info": { + "description": "Additional details that could be of interest about the BooleanResultset. 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 BooleanResultset, not to the whole Beacon or to a result in particular." + }, + "setType": { + "default": "dataset", + "description": "Entry type of BooleanResultset. It SHOULD MATCH an entry type declared as collection in the Beacon configuration.", + "type": "string" + } + }, + "required": [ + "returnedGranularity", + "id", + "setType", + "exists" + ] } }, "description": "Sets of results to be returned as query response.", @@ -54,12 +126,22 @@ }, "resultSets": { "items": { - "$ref": "#/definitions/ResultsetInstance" + "oneOf": [ + { + "$ref": "#/definitions/ResultsetInstance" + }, + { + "$ref": "#/definitions/CountResultsetInstance" + }, + { + "$ref": "#/definitions/BooleanResultsetInstance" + } + ] }, "minItems": 0, "type": "array" } - }, +}, "required": [ "resultSets" ],