Skip to content

Commit

Permalink
adding boolean and count resultSets
Browse files Browse the repository at this point in the history
  • Loading branch information
costero-e committed Jun 11, 2024
1 parent 58e68af commit a629568
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 2 deletions.
7 changes: 6 additions & 1 deletion framework/json/responses/beaconBooleanResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@
"$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/beaconBooleanResultsets.json",
"description": "Response for queries that recovers any result."
},
"responseSummary": {
"$ref": "./sections/beaconBooleanResponseSection.json",
"description": "Boolean (true/false) response section."
}
},
"required": [
"meta",
"responseSummary"
"responseSummary",
"response"
],
"type": "object"
}
7 changes: 6 additions & 1 deletion framework/json/responses/beaconCountResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@
"$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/beaconCountResultsets.json",
"description": "Response for queries that recovers any result."
},
"responseSummary": {
"$ref": "./sections/beaconCountResponseSection.json",
"description": "Response summary, including Boolean and optionally results count."
}
},
"required": [
"meta",
"responseSummary"
"responseSummary",
"response"
],
"type": "object"
}
55 changes: 55 additions & 0 deletions framework/json/responses/sections/beaconBooleanResultsets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": true,
"definitions": {
"BooleanResultsetInstance": {
"additionalProperties": true,
"properties": {
"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": [
"id",
"setType",
"exists"
]
}
},
"description": "Sets of results to be returned as query response.",
"properties": {
"$schema": {
"$ref": "../../common/beaconCommonComponents.json#/definitions/$schema"
},
"resultSets": {
"items": {
"$ref": "#/definitions/BooleanResultsetInstance"
},
"minItems": 0,
"type": "array"
}
},
"required": [
"resultSets"
],
"title": "Beacon BooleanResultset",
"type": "object"
}
60 changes: 60 additions & 0 deletions framework/json/responses/sections/beaconCountResultsets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": true,
"definitions": {
"CountResultsetInstance": {
"additionalProperties": true,
"properties": {
"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": [
"id",
"setType",
"exists",
"resultsCount"
]
}
},
"description": "Sets of results to be returned as query response.",
"properties": {
"$schema": {
"$ref": "../../common/beaconCommonComponents.json#/definitions/$schema"
},
"resultSets": {
"items": {
"$ref": "#/definitions/CountResultsetInstance"
},
"minItems": 0,
"type": "array"
}
},
"required": [
"resultSets"
],
"title": "Beacon CountResultset",
"type": "object"
}

0 comments on commit a629568

Please sign in to comment.