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

fix filter extension implementation #149

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

vincentsarago
Copy link
Member

@vincentsarago vincentsarago commented Sep 24, 2024

closes #148

This PR fixes the CoreCrudClient.item_collection and CoreCrudClient.get_search method implementation for the filter extension .... and add tests ;-)

cc @hrodmn

@hrodmn
Copy link
Collaborator

hrodmn commented Sep 24, 2024

@vincentsarago thanks for adding these changes! Right now stac-fastapi does not support filter-lang=cql2-text in POST requests. That is not required per the spec but is also not obvious to API clients. Fortunately if you try to send a cql2-text string in the filter parameter it will be rejected since it does not match the type expectation set by FilterExtensionPostRequest.

Would it make sense to allow either cql2-text or cql2-json (or cql-json) in POST requests?

@vincentsarago
Copy link
Member Author

vincentsarago commented Sep 24, 2024

oh good point @hrodmn

I guess we need to change the type definition here https://github.com/stac-utils/stac-fastapi/blob/main/stac_fastapi/extensions/stac_fastapi/extensions/core/filter/request.py#L49

note: We should also add tests

@vincentsarago vincentsarago force-pushed the patch/fix-filter-extension-usage branch from 08c78e8 to 0d8c5eb Compare September 24, 2024 20:21
@vincentsarago vincentsarago merged commit c89360c into main Sep 25, 2024
14 checks passed
@vincentsarago vincentsarago deleted the patch/fix-filter-extension-usage branch September 25, 2024 07:15
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.

cql2-json filters not supported in /search GET requests
3 participants