Skip to content

Commit 758095e

Browse files
committed
Removed cql2-text in supported filter-lang for FilterExtensionPostRequest model
1 parent 753341f commit 758095e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Removed
6+
7+
* Removed `cql2-text` in supported `filter-lang` for `FilterExtensionPostRequest` model (as per specification)
8+
59
## [3.0.2] - 2024-09-20
610

711
### Added

stac_fastapi/extensions/stac_fastapi/extensions/core/filter/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class FilterExtensionPostRequest(BaseModel):
7070
default=None,
7171
description="The coordinate reference system (CRS) used by spatial literals in the 'filter' value. Default is `http://www.opengis.net/def/crs/OGC/1.3/CRS84`", # noqa: E501
7272
)
73-
filter_lang: Optional[FilterLang] = Field(
73+
filter_lang: Optional[Literal["cql-json", "cql2-json"]] = Field(
7474
alias="filter-lang",
7575
default="cql2-json",
7676
description="The CQL filter encoding that the 'filter' value uses.",

stac_fastapi/extensions/tests/test_filter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ def test_search_filter_post_filter_lang_default(client: TestClient):
6262

6363
def test_search_filter_post_filter_lang_non_default(client: TestClient):
6464
"""Test search POST endpoint with filter ext."""
65-
filter_lang_value = "cql2-text"
65+
filter_lang_value = "cql-json"
6666
response = client.post(
6767
"/search",
6868
json={
6969
"collections": ["test"],
70-
"filter": {"op": "=", "args": [{"property": "test_property"}, "test-value"]},
70+
"filter": {"eq": [{"property": "test_property"}, "test-value"]},
7171
"filter-lang": filter_lang_value,
7272
},
7373
)

0 commit comments

Comments
 (0)