stac-fastapi-elasticsearch-opensearch icon indicating copy to clipboard operation
stac-fastapi-elasticsearch-opensearch copied to clipboard

Issue with Creating Collections

Open pedro-cf opened this issue 1 year ago • 4 comments

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:

  1. Must specify a license: "test" key/value
  2. Must specify a "links": [] key/value (empty at least)

To Reproduce Steps to reproduce the behavior:

  1. Create a collection without specifying license or links

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...

pedro-cf avatar May 13 '24 13:05 pedro-cf

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.

jonhealy1 avatar May 13 '24 15:05 jonhealy1

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

image

pedro-cf avatar May 13 '24 15:05 pedro-cf

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?

jonhealy1 avatar May 13 '24 15:05 jonhealy1

Links are dynamically assigned already so allowing links to not exist seems like a no-brainer

jonhealy1 avatar May 13 '24 15:05 jonhealy1

Hey, @pedro-cf @jonhealy1 is there any action item needed here or can this issue be closed?

jamesfisher-geo avatar Sep 18 '24 23:09 jamesfisher-geo

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.

pedro-cf avatar Sep 19 '24 10:09 pedro-cf