Skip to content

Commit 5a98453

Browse files
authored
Merge pull request #220 from philvarner/clarify-limit-min-and-max
clarify semantics of the limit parameter
2 parents ee9da22 + 936f2b4 commit 5a98453

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77

8+
## [v1.0.0-beta5 - Unreleased] - TBD
9+
10+
### Added
11+
12+
### Changed
13+
14+
- Limit parameter semantics now match OAFeat. Previously, the behavior was not precisely defined.
15+
16+
### Deprecated
17+
18+
### Removed
19+
20+
### Fixed
21+
822
## [v1.0.0-beta4] - 2020-10-05
923

1024
### Added

item-search/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ The core parameters for STAC search are defined by OAFeat, and STAC adds a few p
115115

116116
| Parameter | Type | Source API | Description |
117117
| ----------- | ---------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
118-
| limit | integer | OAFeat | The maximum number of results to return (page size). Defaults to 10 |
118+
| limit | integer | OAFeat | The maximum number of results to return (page size). |
119119
| bbox | \[number] | OAFeat | Requested bounding box. |
120120
| datetime | string | OAFeat | Single date+time, or a range ('/' separator), formatted to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). Use double dots `..` for open date ranges. |
121121
| intersects | GeoJSON Geometry | STAC | Searches items by performing intersection between their geometry and provided GeoJSON geometry. All GeoJSON geometry types must be supported. |
@@ -124,6 +124,14 @@ The core parameters for STAC search are defined by OAFeat, and STAC adds a few p
124124

125125
See [examples](examples.md) for some example requests.
126126

127+
**limit** The limit parameter follows the same semantics of the OAFeat Item resource limit parameter. The value is
128+
a suggestion to the server as to the maximum number of Item objects the
129+
client would prefer in the response. The OpenAPI specification defines the default and maximum values
130+
for this parameter. The base specifications define these with a default of 10 and a maximum of 10000, but implementers
131+
may choose other values to advertise through their `service-desc` endpoint. If the limit parameter value is greater
132+
than the advertised maximum limit, the server shall return the maximum possible number of items (ideally, the number
133+
as the advertised maximum limit), rather than responding with an error.
134+
127135
Only one of either **intersects** or **bbox** may be specified. If both are specified, a 400 Bad Request response
128136
must be returned.
129137

item-search/openapi.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ components:
190190
name: limit
191191
in: query
192192
description: |-
193-
The optional limit parameter limits the number of items that are presented in the response document.
194-
193+
The optional limit parameter recommends the number of items that should be present in the response document.
194+
195195
Only items are counted that are on the first level of the collection in the response document.
196196
Nested objects contained within the explicitly requested items shall not be counted.
197197
@@ -232,7 +232,16 @@ components:
232232
example: 10
233233
default: 10
234234
maximum: 10000
235-
description: The maximum number of results to return (page size). Defaults to 10
235+
description: |-
236+
The optional limit parameter limits the number of items that are presented in the response document.
237+
238+
If the limit parameter value is greater than advertised limit maximum, the server shall return the
239+
maximum possible number of items, rather than responding with an error.
240+
241+
Only items are counted that are on the first level of the collection in the response document.
242+
Nested objects contained within the explicitly requested items shall not be counted.
243+
244+
Minimum = 1. Maximum = 10000. Default = 10.
236245
bboxFilter:
237246
type: object
238247
description: Only return items that intersect the provided bounding box.

ogcapi-features/openapi.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,10 @@ components:
254254
name: limit
255255
in: query
256256
description: |-
257-
The optional limit parameter limits the number of items that are presented in the response document.
257+
The optional limit parameter recommends the number of items that should be present in the response document.
258+
259+
If the limit parameter value is greater than advertised limit maximum, the server shall return the
260+
maximum possible number of items, rather than responding with an error.
258261
259262
Only items are counted that are on the first level of the collection in the response document.
260263
Nested objects contained within the explicitly requested items shall not be counted.

0 commit comments

Comments
 (0)