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

Transaction Extension: purpose of the collection_id path parameter #406

Closed
drnextgis opened this issue May 25, 2022 · 1 comment · Fixed by #425
Closed

Transaction Extension: purpose of the collection_id path parameter #406

drnextgis opened this issue May 25, 2022 · 1 comment · Fixed by #425

Comments

@drnextgis
Copy link
Contributor

drnextgis commented May 25, 2022

What is the purpose of {collection_id} path parameter? It seems we can put an arbitrary value there and stac-fastapi will take collection name from the body.

image

Since there is no way to specify collection_id via UI it uses {collection_id} as it is 🤷‍♂️

@duckontheweb
Copy link
Contributor

The STAC Spec also requires that a link with a rel type of collection be present if the collection property is present. This means that if you are using something like pystac.Item.validate to validate Items prior to insertion you have to add that link, even though it is going to be replaced by the backend anyway.

It seems like the desired behavior here would be:

  1. Use the collection_id path parameter from the request if there is no collection property in the body or if that property is present and matches the path parameter
  2. Raise an exception if the collection property is present and does not match the path parameter.

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 a pull request may close this issue.

2 participants