Skip to content

Commit 6e6b5d4

Browse files
authored
Merge pull request #4 from stac-api-extensions/pv/clarify-sortable-names
clarify names for sortables
2 parents 8010b93 + a758272 commit 6e6b5d4

File tree

3 files changed

+25
-10
lines changed

3 files changed

+25
-10
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@
1010
**PR Checklist:**
1111

1212
- [ ] This PR has **no** breaking changes.
13-
- [ ] This PR does not make any changes to the core spec in the `stac-spec` directory (these are included as a subtree and should be updated directly in [radiantearth/stac-spec](https://github.com/radiantearth/stac-spec))
1413
- [ ] I have added my changes to the [CHANGELOG](https://github.com/radiantearth/stac-api-spec/blob/main/CHANGELOG.md) **or** a CHANGELOG entry is not required.

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44
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

7+
8+
## [Unreleased] - TBD
9+
10+
### Fixed
11+
12+
- Clarify that the names for sortable fields can either be prefixed by `properties` or not.
13+
714
## [v1.0.0-rc.1] - 2022-03-17
815

916
### Added

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,38 @@
1-
# STAC API - Sort Fragment
1+
# STAC API - Sort Extension
22

33
- **OpenAPI specification:** [openapi.yaml](openapi.yaml)
44
- **Conformance Classes:**
55
- **STAC API - Item Search** binding: <https://api.stacspec.org/v1.0.0-rc.1/item-search#sort>
66
- **STAC API - Features** binding: <https://api.stacspec.org/v1.0.0-rc.1/ogcapi-features#sort>
7-
- **Extension [Maturity Classification](https://github.com/radiantearth/stac-api-spec/README.md#maturity-classification):** Candidate
7+
- **Extension [Maturity Classification](https://github.com/radiantearth/stac-api-spec/blob/main/README.md#maturity-classification):** Candidate
88
- **Dependencies:**
99
- [STAC API - Item Search](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/item-search)
1010
- [STAC API - Features](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/item-search)
1111

12-
This defines a new parameter, `sortby`, that allows the user to define fields by which to sort results.
12+
This specification defines a new parameter, `sortby`, that allows the user to define the fields by which
13+
to sort results.
1314
Only string, numeric, and datetime attributes of Item (`id` and `collection` only) or Item Properties (any attributes)
14-
may be used to sort results. It is not required that implementations support sorting over all attributes, but
15-
implementations should return an error when attempting to sort over a field that does not support sorting.
15+
may be used to sort results.
1616

17-
This fragment may be bound to either or both of
17+
It is not required that implementations support sorting over all attributes, but
18+
implementations should return a 400 Bad Request status code when attempting to sort over a field name that does
19+
not support sorting.
20+
This specification does not yet require the implementation of an "-ables" endpoint (like CQL2 does for queryables)
21+
that defines the names of the
22+
fields that can be sorted over, so implementations must provide this out-of-band. Implementers may choose to require
23+
fields in Item Properties to be prefixed with `properties.` or not, or support use of both the prefixed and non-prefixed
24+
name, e.g., `properties.datetime` or `datetime`.
25+
26+
Sort behavior may be bound to either or both of
1827
[STAC API - Item Search](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/item-search) (`/search` endpoint) or
19-
[STAC API - Features](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/ogcapi-features) (`/collections/{collectionId}/items` endpoint) by
20-
advertising the relevant conformance class.
28+
[STAC API - Features](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/ogcapi-features)
29+
(`/collections/{collectionId}/items` endpoint) by advertising the relevant conformance class.
2130

2231
Fields may be sorted in ascending or descending order. The syntax between GET requests and POST requests with a JSON
2332
body vary. The `sortby` value is an array, so multiple sort fields can be defined which will be used to sort
2433
the data in the order provided (e.g., first by `datetime`, then by `eo:cloud_cover`).
2534

26-
**NOTE**: *This fragment may change, as our goal is to align with OGC API functionality, and sorting is currently being
35+
**NOTE**: *This specification may change, as our goal is to align with OGC API functionality, and sorting is currently being
2736
worked on as part of OGC API - Records, see [this issue](https://github.com/opengeospatial/ogcapi-records/issues/22)
2837
for the latest discussion.*
2938

0 commit comments

Comments
 (0)