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

claify features links wrt to parent link #371

Merged
merged 7 commits into from
Jan 31, 2023

Conversation

philvarner
Copy link
Collaborator

@philvarner philvarner commented Jan 16, 2023

Related Issue(s):

Proposed Changes:

  1. Clarify what the parent link should point to
  2. Add descriptions of Items endpoints

PR Checklist:

  • This PR has no breaking changes.
  • 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)
  • I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.

| ------------ | ----------------------------------- | -------------------- | --------- | -------------------- |
| `root` | `/` | application/json | STAC Core | The root URI |
| `self` | `/collections/{collectionId}/items` | application/geo+json | OAFeat | Self reference |
| `collection` | `/collections/{collectionId}` | application/json | OAFeat | Collection reference |
Copy link
Collaborator

@m-mohr m-mohr Jan 27, 2023

Choose a reason for hiding this comment

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

This one keeps me a bit puzzled. Everywhere in STAC we use parent, but here it is collection. That's not very consistent. I'm wondering whether we should require parent and collection for consistency? On the other hand, /collections also doesn't have a parent, so maybe it's not needed. Just throwing this out here for thoughts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The difference is that this is a link rel from the ItemCollection rather than an Item. The use of collection as the link rel is actually from OAFeat, since the Collection is the parent of all the Items, but not the parent of the ItemCollection (which has no parent).

@@ -97,13 +104,17 @@ The following Link relations must exist in the Landing Page (root).
| `conformance` | `/conformance` | OAFeat | Conformance URI |
| `data` | `/collections` | OAFeat | List of Collections |

### Collections (/collections)

The following Link relations must exist in the `/collections` endpoint response.

| **rel** | **href** | **From** | **Description** |
| ------- | -------------- | --------- | --------------- |
| `root` | `/` | STAC Core | The root URI |
Copy link
Collaborator

@m-mohr m-mohr Jan 27, 2023

Choose a reason for hiding this comment

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

This requirement can't really come from STAC Core as a Collections list does not exist in STAC Core. Same applies for /collections/{collectionId}/items. I'm also confused why we require root, but not parent? I'm not saying we should require both, more asking why is it inconsistent? Shouldn't it either require or not require both?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agree about From not being Core -- I'll fix that.

Same for /items -- the root Catalog is the parent of all the Collections, but not the "CollectionCollection" returned by /collections, so we don't use parent here. Presumably we could add the equivalent of the collections link rel in /items, but it's always going to be the same as root (I think?) and I don't know what link rel name would be -- catalog?

@philvarner philvarner merged commit 3730d5e into radiantearth:main Jan 31, 2023
philvarner added a commit to philvarner/stac-api-spec that referenced this pull request Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants