From 1449c950abc343c5da066e93ba2b936277b6ce45 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Mon, 27 Apr 2020 10:18:39 -0400 Subject: [PATCH 1/2] cleanup Context Extension text --- STAC-extensions.yaml | 11 ++-- extensions/context/README.md | 12 ++--- extensions/context/context.fragment.yaml | 11 ++-- extensions/context/examples/example.json | 56 +++++++++++++++++-- extensions/context/json-schema/schema.json | 10 ++-- package-lock.json | 63 +++++++--------------- 6 files changed, 92 insertions(+), 71 deletions(-) diff --git a/STAC-extensions.yaml b/STAC-extensions.yaml index 4cbda15b..7414098d 100644 --- a/STAC-extensions.yaml +++ b/STAC-extensions.yaml @@ -1644,9 +1644,12 @@ components: context: type: object required: - - next - returned properties: + returned: + type: integer + minimum: 0 + example: 1 limit: type: integer nullable: true @@ -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 diff --git a/extensions/context/README.md b/extensions/context/README.md index 83394f2e..df0c831a 100644 --- a/extensions/context/README.md +++ b/extensions/context/README.md @@ -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. @@ -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 } } ``` diff --git a/extensions/context/context.fragment.yaml b/extensions/context/context.fragment.yaml index ce611b16..dde12c64 100644 --- a/extensions/context/context.fragment.yaml +++ b/extensions/context/context.fragment.yaml @@ -6,9 +6,12 @@ components: 'context': type: object required: - - next - returned properties: + returned: + type: integer + minimum: 0 + example: 1 limit: type: integer nullable: true @@ -17,8 +20,4 @@ components: matched: type: integer minimum: 0 - example: 1 - returned: - type: integer - minimum: 0 - example: 1 \ No newline at end of file + example: 314159 diff --git a/extensions/context/examples/example.json b/extensions/context/examples/example.json index a10eb175..ed9bf21d 100644 --- a/extensions/context/examples/example.json +++ b/extensions/context/examples/example.json @@ -1,9 +1,55 @@ { "type": "FeatureCollection", - "features": [ ], "context": { - "limit": 10, - "matched": 1092873, - "returned": 9 - } + "returned": 1, + "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": { } + } + ] } \ No newline at end of file diff --git a/extensions/context/json-schema/schema.json b/extensions/context/json-schema/schema.json index 5913270f..f92061c1 100644 --- a/extensions/context/json-schema/schema.json +++ b/extensions/context/json-schema/schema.json @@ -3,7 +3,7 @@ "$id": "schema.json#", "title": "Context Extension", "type": "object", - "description": "STAC search metadata", + "description": "STAC context metadata", "allOf": [ { "$ref": "#/definitions/context" @@ -22,6 +22,10 @@ "returned" ], "properties": { + "returned": { + "type": "integer", + "minimum": 0 + }, "limit": { "type": ["integer", "null"], "minimum": 0 @@ -29,10 +33,6 @@ "matched": { "type": "integer", "minimum": 0 - }, - "returned": { - "type": "integer", - "minimum": 0 } } } diff --git a/package-lock.json b/package-lock.json index 2d3b3949..c046f751 100644 --- a/package-lock.json +++ b/package-lock.json @@ -798,14 +798,15 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" }, "handlebars": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", - "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", "requires": { + "minimist": "^1.2.5", "neo-async": "^2.6.0", - "optimist": "^0.6.1", "source-map": "^0.6.1", - "uglify-js": "^3.1.4" + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" } }, "has-flag": { @@ -1111,23 +1112,16 @@ "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } + "minimist": "^1.2.5" } }, "mobx": { @@ -1354,22 +1348,6 @@ "json-pointer": "^0.6.0" } }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" - } - } - }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -2045,13 +2023,12 @@ "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" }, "uglify-js": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.2.tgz", - "integrity": "sha512-uhRwZcANNWVLrxLfNFEdltoPNhECUR3lc+UdJoG9CBpMcSnKyWA94tc3eAujB1GcMY5Uwq8ZMp4qWpxWYDQmaA==", + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.9.1.tgz", + "integrity": "sha512-JUPoL1jHsc9fOjVFHdQIhqEEJsQvfKDjlubcCilu8U26uZ73qOg8VsN8O1jbuei44ZPlwL7kmbAdM4tzaUvqnA==", "optional": true, "requires": { - "commander": "~2.20.3", - "source-map": "~0.6.1" + "commander": "~2.20.3" } }, "url": { @@ -2114,9 +2091,9 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" }, "wrap-ansi": { "version": "2.1.0", From 9547a81a407a99f1eb3dd11ce2b32a6d4268a393 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Mon, 18 May 2020 09:54:08 -0400 Subject: [PATCH 2/2] add changelog --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..79bae579 --- /dev/null +++ b/CHANGELOG.md @@ -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 + + +