Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup Context Extension text #21

Merged
merged 2 commits into from
May 20, 2020
Merged
Show file tree
Hide file tree
Changes from all 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 CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

For changes in 0.9.0 and prior, see the [STAC Spec Changelog](https://github.com/radiantearth/stac-spec/CHANGELOG.md).

## [Unreleased]

### Removed

### Added

### Changed
- Context Extension OpenAPI spec was updated to remove the no longer used `next` attribute

### Fixed



11 changes: 5 additions & 6 deletions STAC-extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1644,9 +1644,12 @@ components:
context:
type: object
required:
- next
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed, as it is no longer a field at all

- returned
properties:
returned:
type: integer
minimum: 0
example: 1
limit:
type: integer
nullable: true
Expand All @@ -1655,11 +1658,7 @@ components:
matched:
type: integer
minimum: 0
example: 1
returned:
type: integer
minimum: 0
example: 1
example: 314159
item:
description: >-
A GeoJSON Feature augmented with foreign members that contain values
Expand Down
12 changes: 6 additions & 6 deletions extensions/context/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ search, for example, from calling the `/search` API endpoint.

| Element | Type | Description |
| ------------ | --------------- | ------------------------------------------------------------ |
| returned | integer | **REQUIRED** The count of results returned by this response. equal to the cardinality of features array |
| limit | integer \| null | The maximum number of results to which the result was limited |
| matched | integer | The count of total number of results that match for this query, possibly estimated, particularly in the context of NoSQL data stores |
| returned | integer | **REQUIRED** The count of results returned by this response. Equal to the cardinality of features array. |
| limit | integer \| null | The maximum number of results to which the result was limited. |
| matched | integer | The count of total number of results that match for this query, possibly estimated, particularly in the context of NoSQL data stores. |

The default sort of query results should be stable, but may not be depending on the data store's sorting performance. It is recommended that the [Sort API Extension](../sort/README.md) be implemented in conjunction with this extension and that fields conducive to stable sorting have sorting enabled over them.
The default sort of query results should be stable, but may not be, depending on the data store's sorting semantics. It is recommended that the [Sort API Extension](../sort/README.md) be implemented in conjunction with this extension and that fields conducive to stable sorting have sorting enabled over them.

**limit** - The maximum number of results requested explicitly, the default limit used by the service implementation if no parameter was provided, or the maximum limit used by the service implementation if the limit parameter was larger. `null` if no limit was placed on the query that retrieved these results, which should be a rare case in practice.

Expand All @@ -33,9 +33,9 @@ search, for example, from calling the `/search` API endpoint.
"type": "FeatureCollection",
"features": [ ],
"context": {
"returned": 9,
"limit": 10,
"matched": 1092873,
"returned": 9
"matched": 1092873
}
}
```
11 changes: 5 additions & 6 deletions extensions/context/context.fragment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ components:
'context':
type: object
required:
- next
- returned
properties:
returned:
type: integer
minimum: 0
example: 1
limit:
type: integer
nullable: true
Expand All @@ -17,8 +20,4 @@ components:
matched:
type: integer
minimum: 0
example: 1
returned:
type: integer
minimum: 0
example: 1
example: 314159
56 changes: 51 additions & 5 deletions extensions/context/examples/example.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,55 @@
{
"type": "FeatureCollection",
"features": [ ],
"context": {
"limit": 10,
"matched": 1092873,
"returned": 9
}
"returned": 1,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this example is not correct, since the "returned" value matches the number of features.

"limit": 1,
"matched": 1092873
},
"features": [
{
"stac_version": "0.9.0",
"stac_extensions": [],
"type": "Feature",
"id": "CS3-20160503_132131_05",
"bbox": [
-122.59750209,
37.48803556,
-122.2880486,
37.613537207
],
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-122.308150179,
37.488035566
],
[
-122.597502109,
37.538869539
],
[
-122.576687533,
37.613537207
],
[
-122.288048600,
37.562818007
],
[
-122.308150179,
37.488035566
]
]
]
},
"properties": {
"datetime": "2016-05-03T13:22:30.040Z"
},
"collection": "CS3",
"links": [ ],
"assets": { }
}
]
}
10 changes: 5 additions & 5 deletions extensions/context/json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "schema.json#",
"title": "Context Extension",
"type": "object",
"description": "STAC search metadata",
"description": "STAC context metadata",
"allOf": [
{
"$ref": "#/definitions/context"
Expand All @@ -22,17 +22,17 @@
"returned"
],
"properties": {
"returned": {
"type": "integer",
"minimum": 0
},
"limit": {
"type": ["integer", "null"],
"minimum": 0
},
"matched": {
"type": "integer",
"minimum": 0
},
"returned": {
"type": "integer",
"minimum": 0
}
}
}
Expand Down
63 changes: 20 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.