Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions framework/json/common/beaconCommonComponents.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,27 @@
"pattern": "^\\w[^:]+:.+$",
"type": "string"
},
"CountAdjustedTo": {
"description": "For counts with intentional (e.g. due to privacy concerns) or technical derived imprecision this parameter offers an option to declare the range or limits for the true results.",
"items": {
"minimum": 1,
"type": [
"integer",
"string"
]
},
"maxItems": 2,
"minItems": 1,
"type": "array"
},
"CountPrecision": {
"default": "rounded",
"enum": [
"exact",
"rounded"
],
"type": "string"
},
"Exists": {
"description": "Indicator of whether any record was observed in any of the collections queried. This should be non-null.",
"examples": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Payload definition for the \"count\" response.",
"properties": {
"countAdjustedTo": {
"$ref": "../../common/beaconCommonComponents.json#/$defs/CountAdjustedTo",
"description": "List of handovers that apply to this resultset, not to the whole Beacon or to a result in particular."
},
"countPrecision": {
"$ref": "../../common/beaconCommonComponents.json#/$defs/CountPrecision",
"description": "List of handovers that apply to this resultset, not to the whole Beacon or to a result in particular."
},
"exists": {
"$ref": "../../common/beaconCommonComponents.json#/$defs/Exists"
},
Expand Down
8 changes: 7 additions & 1 deletion framework/json/responses/sections/beaconResultsets.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
"ResultsetInstance": {
"additionalProperties": true,
"properties": {
"countAdjustedTo": {
"$ref": "../../common/beaconCommonComponents.json#/$defs/CountAdjustedTo"
},
"countPrecision": {
"$ref": "../../common/beaconCommonComponents.json#/$defs/CountPrecision"
},
"exists": {
"type": "boolean"
},
Expand All @@ -23,7 +29,7 @@
"type": "array"
},
"resultsCount": {
"description": "Number of results in this Resultset.",
"description": "Precise or approximate number of results in this Resultset.",
"type": "integer"
},
"resultsHandovers": {
Expand Down
19 changes: 19 additions & 0 deletions framework/src/common/beaconCommonComponents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,25 @@ $defs:
type: string
examples:
- 'The provided parameters are incomplete: `start` is missing.'
CountAdjustedTo:
description: >-
For counts with intentional (e.g. due to privacy concerns) or technical
derived imprecision this parameter offers an option to declare the range
or limits for the true results.
type: array
minItems: 1
maxItems: 2
items:
type:
- integer
- string
minimum: 1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to have examples.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just created a couple from the discussion that @jrambla created. Check them out here b630915.

CountPrecision:
enum:
- exact
- rounded
default: rounded
type: string
CURIE:
pattern: ^\w[^:]+:.+$
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ description: >-
Payload definition for the "count" response.
type: object
properties:
countAdjustedTo:
description: List of handovers that apply to this resultset, not to the whole
Beacon or to a result in particular.
$ref: ../../common/beaconCommonComponents.yaml#/$defs/CountAdjustedTo
countPrecision:
description: List of handovers that apply to this resultset, not to the whole
Beacon or to a result in particular.
$ref: ../../common/beaconCommonComponents.yaml#/$defs/CountPrecision
exists:
$ref: ../../common/beaconCommonComponents.yaml#/$defs/Exists
numTotalResults:
Expand Down
10 changes: 8 additions & 2 deletions framework/src/responses/sections/beaconResultsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@ $defs:
exists:
type: boolean
resultsCount:
description: Number of results in this Resultset.
description: >-
Precise or approximate number of results in this Resultset.
type: integer
countAdjustedTo:
$ref: ../../common/beaconCommonComponents.yaml#/$defs/CountAdjustedTo
countPrecision:
$ref: ../../common/beaconCommonComponents.yaml#/$defs/CountPrecision
resultsHandovers:
description: List of handovers that apply to this resultset, not to the whole
description: >-
List of handovers that apply to this resultset, not to the whole
Beacon or to a result in particular.
$ref: ../../common/beaconCommonComponents.yaml#/$defs/ListOfHandovers
info:
Expand Down