Skip to content

feat: filter collection based on name #218

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sanzog03
Copy link

What I am changing

  • Add the ability to filter collections based on collection ID.

How I did it

  • Add a query parameter depdency injection which checks for collection ID substring regex, validates the regex and uses that to filter the CollectionList.

How you can test it

  • Using the API docs, check the list of collections without any filter. Then, select any collection and use part of the collection ID as input to the collectionID regex filter to check the result.
  • A test is added to the code.

@slesaad
Copy link

slesaad commented May 20, 2025

@vincentsarago can you please have a look at this? we have this need for GHG center

@vincentsarago vincentsarago self-requested a review May 20, 2025 16:12
@vincentsarago
Copy link
Member

Hi @sanzog03 @slesaad

This feature would be outside OGC spec. I think it would make more sense to implement CQL filter like we have for collections-search in stac-api-spec https://github.com/stac-api-extensions/collection-search?tab=readme-ov-file#filter-cql

cc @hrodmn @bitner

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 this pull request may close these issues.

3 participants