Skip to content

Commit

Permalink
openapi: Fixed SwaggerHub warnings for numberMatched and numberReturned
Browse files Browse the repository at this point in the history
- The numberMatched.yaml and numberReturned.yaml files should have been referenced in the collections response
- Using elements rather than features and items to avoid confusion with OGC API - Features "items"
  • Loading branch information
jerstlouis committed Aug 9, 2024
1 parent 902290e commit 6a1487e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
12 changes: 4 additions & 8 deletions standard/openapi/ogcapi-coverages-1.bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -842,14 +842,10 @@
"format": "date-time"
},
"numberMatched": {
"type": "integer",
"minimum": 0,
"example": 1
"$ref": "#/components/schemas/numberMatched"
},
"numberReturned": {
"type": "integer",
"minimum": 0,
"example": 1
"$ref": "#/components/schemas/numberReturned"
},
"collections": {
"type": "array",
Expand Down Expand Up @@ -1407,13 +1403,13 @@
"example": "2017-08-17T08:05:32Z"
},
"numberReturned": {
"description": "The number of items in the response.\nA server may omit this information, if the information about the \nnumber of items is not known or difficult to compute.\nIf the value is provided, the value shall be identical to the number\nof items in the response.",
"description": "The number of elements in the response.\nA server may omit this information, if the information about the\nnumber of elements is not known or difficult to compute.\nIf the value is provided, the value shall be identical to the number\nof elements in the response.",
"type": "integer",
"minimum": 0,
"example": 10
},
"numberMatched": {
"description": "The number of features of the feature type that match the selection\nparameters like `bbox`.",
"description": "The number of elements in the response that match the selection parameters like `bbox`.",
"type": "integer",
"minimum": 0,
"example": 127
Expand Down
8 changes: 2 additions & 6 deletions standard/openapi/schemas/common-geodata/collections.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ properties:
type: string
format: date-time
numberMatched:
type: integer
minimum: 0
example: 1
$ref: 'numberMatched.yaml'
numberReturned:
type: integer
minimum: 0
example: 1
$ref: 'numberReturned.yaml'
collections:
type: array
items:
Expand Down
5 changes: 2 additions & 3 deletions standard/openapi/schemas/common-geodata/numberMatched.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
description: |-
The number of features of the feature type that match the selection
parameters like `bbox`.
The number of elements in the response that match the selection parameters like `bbox`.
type: integer
minimum: 0
example: 127
example: 127
8 changes: 4 additions & 4 deletions standard/openapi/schemas/common-geodata/numberReturned.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
description: |-
The number of items in the response.
A server may omit this information, if the information about the
number of items is not known or difficult to compute.
The number of elements in the response.
A server may omit this information, if the information about the
number of elements is not known or difficult to compute.
If the value is provided, the value shall be identical to the number
of items in the response.
of elements in the response.
type: integer
minimum: 0
example: 10

0 comments on commit 6a1487e

Please sign in to comment.