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

Assign specific media types to relation types #1259

Merged
merged 7 commits into from
May 15, 2024
Merged

Assign specific media types to relation types #1259

merged 7 commits into from
May 15, 2024

Conversation

m-mohr
Copy link
Collaborator

@m-mohr m-mohr commented Oct 5, 2023

Related Issue(s): None

Proposed Changes:

Clarified which media types should be used for the hierarchical relation types.

Intention is to make clients more aware of checking media types as with OGC API - Records etc. we'll run more and more into examples where the media types could be different.

Example with a child link with JSON & HTML media types: https://api.weather.gc.ca/stac/?f=json
or as a JSON excerpt:

{
   "type":"Catalog",
   ...
   "links":[
      {
         "rel":"child",
         "href":"https://api.weather.gc.ca/stac/msc-datamart?f=json",
         "type":"application/json"
      },
      {
         "rel":"child",
         "href":"https://api.weather.gc.ca/stac/msc-datamart",
         "type":"text/html"
      }
   ]
}

Nothing in the spec disallows this, I think.
And we should not disallow it iMHO, to keep compliant with OGC API - Records.

PR Checklist:

  • This PR is made against the dev branch (all proposed changes except releases should be against dev, not master).
  • This PR has no breaking changes.
  • I have added my changes to the CHANGELOG
    or a CHANGELOG entry is not required.
  • This PR affects the STAC API spec,
    and I have opened issue/PR #XXX to track the change.

Copy link
Collaborator

@gadomski gadomski left a comment

Choose a reason for hiding this comment

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

Two questions:

  1. Is there a place in the spec where it would be appropriate to link into OGC API - Records to indicate the intent to align? It'd be good to preserve the reason behind this change in the documentation somewhere, and I'm not sure the CHANGELOG is the right place?
  2. Is there a place in the spec where it would be appropriate to warn clients/consumers about the need to filter hierarchical links by media type (e.g. how you told me about it in get_child_links/get_item_links: Ensure correct media type stac-utils/pystac#1255)? I'm not sure it would be obvious to new implementors that there could be other item links that they shouldn't load as an Item.

catalog-spec/catalog-spec.md Outdated Show resolved Hide resolved
collection-spec/collection-spec.md Outdated Show resolved Hide resolved
item-spec/item-spec.md Outdated Show resolved Hide resolved
item-spec/item-spec.md Outdated Show resolved Hide resolved
Co-authored-by: Pete Gadomski <pete.gadomski@gmail.com>
@m-mohr m-mohr marked this pull request as draft October 9, 2023 15:33
@m-mohr m-mohr marked this pull request as ready for review May 14, 2024 21:34
@m-mohr
Copy link
Collaborator Author

m-mohr commented May 14, 2024

Yes, we should probably add what @gadomski proposed.

@m-mohr
Copy link
Collaborator Author

m-mohr commented May 14, 2024

@gadomski Added in 80b75c9

item-spec/item-spec.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@gadomski gadomski left a comment

Choose a reason for hiding this comment

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

Needs one header text in a table.

@m-mohr m-mohr requested a review from gadomski May 15, 2024 15:20
@m-mohr
Copy link
Collaborator Author

m-mohr commented May 15, 2024

@gadomski Fixed, please re-review.

@m-mohr m-mohr merged commit 3961d47 into dev May 15, 2024
2 checks passed
@m-mohr m-mohr deleted the rel-media-types branch May 15, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants