From 57f16d0bf83cd3cc2cd1c38ade4a3814ac704996 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 7 Mar 2023 07:42:46 -0700 Subject: [PATCH 1/3] Use collection relation for links to collection --- CHANGELOG.md | 1 + ogcapi-features/README.md | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51189594..33793d9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added extension field to all OpenAPI specifications `x-conformance-classes` indicating the conformance classes they define. - STAC API - Item Search now requires a `root` link relation in the response from `/search` +- Added a `collection` link from and Item to its Collection to conform with the STAC spec. ### Fixed diff --git a/ogcapi-features/README.md b/ogcapi-features/README.md index 5d7a8ee3..7d6b2a59 100644 --- a/ogcapi-features/README.md +++ b/ogcapi-features/README.md @@ -157,12 +157,11 @@ The following Link relations must exist in the Item object returned from the `/c | **rel** | **href** | **Media Type** | **From** | **Description** | | -------- | -------------------------------------------- | -------------------- | ------------------- | --------------------------------------------------- | | `root` | `/` | application/json | STAC API - Features | The root URI | +| `collection` | `/collections/{collectionId}` | application/json | STAC Collection | The containing Collection | | `parent` | `/collections/{collectionId}` | application/json | OAFeat | Parent reference, usually the containing Collection | | `self` | `/collections/{collectionId}/items/{itemId}` | application/geo+json | OAFeat | Self reference | -Note that the `parent` link for an Item should point to the containing Collection -(e.g., `/collections/{collectionId}`), rather than the API sub-path -of `/collections/{collectionId}/items/`. +The `parent` link for an item may point to a Collection or a Catalog. A `collection` link for an Item will always point to the containing Collection. Links to a Collection must point to the `/collections/{collectionId}` endpoint, rather than the API sub-path of `/collections/{collectionId}/items/`. ## Endpoints From 4e3846764d81fe06c92b908ec4e8b6f1bbed0598 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 13 Mar 2023 13:58:34 -0600 Subject: [PATCH 2/3] Update ogcapi-features/README.md Co-authored-by: Phil Varner --- ogcapi-features/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogcapi-features/README.md b/ogcapi-features/README.md index 7d6b2a59..e729afdd 100644 --- a/ogcapi-features/README.md +++ b/ogcapi-features/README.md @@ -161,7 +161,7 @@ The following Link relations must exist in the Item object returned from the `/c | `parent` | `/collections/{collectionId}` | application/json | OAFeat | Parent reference, usually the containing Collection | | `self` | `/collections/{collectionId}/items/{itemId}` | application/geo+json | OAFeat | Self reference | -The `parent` link for an item may point to a Collection or a Catalog. A `collection` link for an Item will always point to the containing Collection. Links to a Collection must point to the `/collections/{collectionId}` endpoint, rather than the API sub-path of `/collections/{collectionId}/items/`. +The `parent` link for an Item may point to a Collection or a Catalog. The `collection` link for an Item will always point to the containing Collection. Links to a Collection must point to the `/collections/{collectionId}` endpoint, rather than the API sub-path of `/collections/{collectionId}/items/`. ## Endpoints From 196816a7bac22d408237897f1e69fd3e9e6bc05b Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 13 Mar 2023 14:00:48 -0600 Subject: [PATCH 3/3] Document that the parent and collection relations comes from STAC Item --- ogcapi-features/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ogcapi-features/README.md b/ogcapi-features/README.md index e729afdd..eab068c7 100644 --- a/ogcapi-features/README.md +++ b/ogcapi-features/README.md @@ -157,8 +157,8 @@ The following Link relations must exist in the Item object returned from the `/c | **rel** | **href** | **Media Type** | **From** | **Description** | | -------- | -------------------------------------------- | -------------------- | ------------------- | --------------------------------------------------- | | `root` | `/` | application/json | STAC API - Features | The root URI | -| `collection` | `/collections/{collectionId}` | application/json | STAC Collection | The containing Collection | -| `parent` | `/collections/{collectionId}` | application/json | OAFeat | Parent reference, usually the containing Collection | +| `collection` | `/collections/{collectionId}` | application/json | STAC Item | The containing Collection | +| `parent` | `/collections/{collectionId}` | application/json | STAC Item | Parent reference, usually the containing Collection | | `self` | `/collections/{collectionId}/items/{itemId}` | application/geo+json | OAFeat | Self reference | The `parent` link for an Item may point to a Collection or a Catalog. The `collection` link for an Item will always point to the containing Collection. Links to a Collection must point to the `/collections/{collectionId}` endpoint, rather than the API sub-path of `/collections/{collectionId}/items/`.