Skip to content

Commit

Permalink
Merge pull request #12 from gadomski/issues/8-get-ambiguity
Browse files Browse the repository at this point in the history
Add clarification around GET w/o include
  • Loading branch information
philvarner authored Sep 27, 2023
2 parents f749a3c + 98c7e3f commit 1b73af7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- Clarified behavior of GET requests when `include` is missing ([#12](https://github.com/stac-api-extensions/fields/pull/12))

## [v1.0.0-rc.3] - 2022-03-29

### Changed
Expand Down Expand Up @@ -33,6 +39,7 @@ None
Versions [v1.0.0-rc.1](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1) and
prior can be found in the [stac-api-spec](https://github.com/radiantearth/stac-api-spec/) repo

[Unreleased]: <https://github.com/stac-api-extensions/fields/compare/v1.0.0-rc.3...main>
[v1.0.0-rc.3]: <https://github.com/stac-api-extensions/fields/tree/v1.0.0-rc.3>
[v1.0.0-rc.2]: <https://github.com/stac-api-extensions/fields/tree/v1.0.0-rc.2>
[v1.0.0-rc.1]: <https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1>
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ name, e.g., `properties.datetime` or `datetime`.
2. If only `include` is specified, these fields should be the only fields included.
Any additional fields provided beyond those in the `include` list should be kept
to a minimum, as the caller has explicitly stated they do not need them.
3. If only `exclude` is specified, the specified fields should not be
included, but every other field available for the
Item should be included.
4. If `exclude` is specified and `include` is null or an empty
array, then the `exclude` fields should be excluded from the default set.
3. For POST requests, if only `exclude` is specified, the specified fields
should not be included, but every other field available for the Item should be
included.
4. For POST requests, if `exclude` is specified and `include` is null or an
empty array, then the `exclude` fields should be excluded from the default set.
This also applies to GET requests when only `exclude` fields are specified.
5. For nested fields (e.g., `properties.datetime`), the most specific path
should be honored first, and `include` should be preferred over `exclude`. For
example:
Expand Down

0 comments on commit 1b73af7

Please sign in to comment.