-
Notifications
You must be signed in to change notification settings - Fork 36
Support creating ItemCollections in Transaction Extension #35
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
Support creating ItemCollections in Transaction Extension #35
Conversation
The image copies the root project to /app and matching that through docker-compose allows host file updates to be copied without rebuilding the image.
Updates to the transaction spec indicate POST against items should allow ItemCollection.
In the transaction extension, Items and Collection can't have mismatched ids from the path, but should have the path collection id applied if it is missing. Ids for both are also not allowed to be a "percent encoded" value per RFC 3986.
Note: This is draft until stac-utils/stac-fastapi#574 is released, as tests here will fail without it. |
…d/stac-fastapi-pgstac into mjm/trasaction-item-collection
The spec leaves the return type for Item creation open to the implementation. This change unifies the response of both Item/ItemCollection POST requests to return an empty response with a Location header for the newly created single Item, in that case.
Use a setting value instead of a constant so that IDs could be set per instance.
After realizing the extent of the breaking change resulting from a unified response between Item/ItemCollection Tx endpoint, restoring the original behavior.
@gadomski I added some commits that should address your comments, thanks for the feedback. I had started down the path of response unification, but then realized the extent to which it was a meaningful breaking changed, and walked it back in a subsequent commit. Tests pass locally against stac-fastapi |
Description:
Implements "create ItemCollection" via the Transaction extension and provides additional validation and behavior on ids when creating Items or ItemCollections. I'll note that the api spec indicates percent encoded characters are discouraged, but this change makes them invalid for this backend. That's an opinioned change, and I'm willing to walk it back to a subset (like just "/") if that flexibility is desired.
See: https://github.com/radiantearth/stac-spec/blob/master/best-practices.md#item-ids
See: https://github.com/radiantearth/stac-api-spec/blob/master/ogcapi-features/extensions/transaction/README.md#methods
Fixes: #23
PR Checklist:
pre-commit
hooks pass locallymake test
)make docs
)