stac-fastapi-elasticsearch-opensearch
stac-fastapi-elasticsearch-opensearch copied to clipboard
Issue with Creating Collections
Describe the bug
Greetings since the stac-fastapi.api update to 3.0.0a it seems that when creating collections two additional restrictions were added:
- Must specify a
license: "test"key/value - Must specify a
"links": []key/value (empty at least)
To Reproduce Steps to reproduce the behavior:
- Create a collection without specifying
licenseorlinks
Expected behavior Be able to create a collection without specifying these 2 fields.
Additional Context
Not sure if this is a stac-fastapi.core or stac-fastapi.api issue...
According to this document, both of those fields are required: https://github.com/radiantearth/stac-spec/blob/master/collection-spec/collection-spec.md#collection-fields. In stac-fastapi.types.stac it looks like these fields are not optional but I think the error is coming from stac-pydantic.
According to this document, both of those fields are required: https://github.com/radiantearth/stac-spec/blob/master/collection-spec/collection-spec.md#collection-fields. In stac-fastapi.types.stac it looks like these fields are not optional but I think the error is coming from stac-pydantic.
I can understand the license field being a new stac spec rule, but the links field seems weird to me, since the new strategy with stac-fastapi.api is to not store links in the database and have the api return the links dynamically.
https://github.com/stac-utils/stac-fastapi/blob/096c93032335d43fd45433297e804f8582c803a5/stac_fastapi/types/stac_fastapi/types/links.py#L10-L14
I do agree with you. There's a similar issue where someone wants to ingest items without the collection_id field because the stac api should be able to assign this field based on what collection the items are being added to. Even license? If someone doesn't care if their data doesn't have license?
Links are dynamically assigned already so allowing links to not exist seems like a no-brainer
Hey, @pedro-cf @jonhealy1 is there any action item needed here or can this issue be closed?
Hey, @pedro-cf @jonhealy1 is there any action item needed here or can this issue be closed?
Greetings, I believe this an upstream task, so we should close this.