Skip to content

Commit

Permalink
adding boolean and count resultSets to yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
costero-e committed Jun 11, 2024
1 parent a629568 commit 3f9edbb
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 1 deletion.
6 changes: 5 additions & 1 deletion framework/src/responses/beaconBooleanResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ properties:
description: >-
List of handovers that apply to the whole response, not to any resultset
or result in particular.
$ref: ../common/beaconCommonComponents.yaml#/definitions/ListOfHandovers
response:
description: >-
Response for queries that recovers any result.
$ref: ./sections/beaconBooleanResultsets.yaml
required:
- meta
- responseSummary
- response
5 changes: 5 additions & 0 deletions framework/src/responses/beaconCountResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ properties:
List of handovers that apply to the whole response, not to any resultset
or result in particular.
$ref: ../common/beaconCommonComponents.yaml#/definitions/ListOfHandovers
response:
description: >-
Response for queries that recovers any result.
$ref: ./sections/beaconBooleanResultsets.yaml
required:
- meta
- responseSummary
- response
33 changes: 33 additions & 0 deletions framework/src/responses/sections/beaconBooleanResponse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
$schema: https://json-schema.org/draft/2020-12/schema
description: >-
Complete definition for a minimal response that provides *only* a `Boolean`
exists true|false answer.
type: object
properties:
meta:
description: >-
Information about the response that could be relevant for the Beacon
client in order to interpret the results.
$ref: ./sections/beaconResponseMeta.yaml
responseSummary:
description: >-
Boolean (true/false) response section.
$ref: ./sections/beaconBooleanResponseSection.yaml
info:
description: >-
Additional details that could be of interest. Provided to clearly
enclose any attribute that is not part of the Beacon specification.
$ref: ../common/beaconCommonComponents.yaml#/definitions/Info
beaconHandovers:
description: >-
List of handovers that apply to the whole response, not to any resultset
or result in particular.
$ref: ../common/beaconCommonComponents.yaml#/definitions/ListOfHandovers
response:
description: >-
Response for queries that recovers any result.
$ref: ./sections/beaconBooleanResultsets.yaml
required:
- meta
- responseSummary
- response
43 changes: 43 additions & 0 deletions framework/src/responses/sections/beaconBooleanResultsets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
$schema: https://json-schema.org/draft/2020-12/schema
title: Beacon BooleanResultSet
description: Sets of results to be returned as query response.
type: object
properties:
$schema:
$ref: ../../common/beaconCommonComponents.yaml#/definitions/$schema
resultSets:
type: array
items:
$ref: '#/definitions/BooleanResultsetInstance'
minItems: 0
required:
- resultSets
additionalProperties: true
definitions:
BooleanResultsetInstance:
properties:
id:
description: id of the Booleanresultset
type: string
example: datasetA
setType:
description: Entry type of BooleanresultSet. It SHOULD MATCH an entry type declared
as collection in the Beacon configuration.
type: string
default: dataset
exists:
type: boolean
resultsHandovers:
description: List of handovers that apply to this Booleanresultset, not to the whole
Beacon or to a result in particular.
$ref: ../../common/beaconCommonComponents.yaml#/definitions/ListOfHandovers
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
required:
- id
- setType
- exists
additionalProperties: true
47 changes: 47 additions & 0 deletions framework/src/responses/sections/beaconCountResultsets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
$schema: https://json-schema.org/draft/2020-12/schema
title: Beacon CountResultSet
description: Sets of results to be returned as query response.
type: object
properties:
$schema:
$ref: ../../common/beaconCommonComponents.yaml#/definitions/$schema
resultSets:
type: array
items:
$ref: '#/definitions/CountResultsetInstance'
minItems: 0
required:
- resultSets
additionalProperties: true
definitions:
CountResultsetInstance:
properties:
id:
description: id of the Countresultset
type: string
example: datasetA
setType:
description: Entry type of CountresultSet. It SHOULD MATCH an entry type declared
as collection in the Beacon configuration.
type: string
default: dataset
exists:
type: boolean
resultsCount:
description: Number of results in this CountResultset.
type: integer
resultsHandovers:
description: List of handovers that apply to this Countresultset, not to the whole
Beacon or to a result in particular.
$ref: ../../common/beaconCommonComponents.yaml#/definitions/ListOfHandovers
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
required:
- id
- setType
- exists
- resultsCount
additionalProperties: true

0 comments on commit 3f9edbb

Please sign in to comment.