File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
stac_fastapi/core/stac_fastapi/core/extensions Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 55from fastapi import APIRouter , FastAPI , Request
66from fastapi .responses import JSONResponse
77from pydantic import BaseModel
8+ from stac_pydantic .api .search import ExtendedSearch
89from starlette .responses import Response
910
1011from stac_fastapi .api .models import APIRequest
1314from stac_fastapi .types .stac import Collections
1415
1516
17+ class CollectionsSearchRequest (ExtendedSearch ):
18+ """Extended search model for collections with free text search support."""
19+
20+ q : Optional [Union [str , List [str ]]] = None
21+
22+
1623class CollectionsSearchEndpointExtension (ApiExtension ):
1724 """Collections search endpoint extension.
1825
@@ -128,10 +135,8 @@ async def collections_search_post_endpoint(
128135 Returns:
129136 Collections: Collections object.
130137 """
131- from stac_pydantic .api .search import ExtendedSearch
132-
133138 # Convert the dict to an ExtendedSearch model
134- search_request = ExtendedSearch .model_validate (body )
139+ search_request = CollectionsSearchRequest .model_validate (body )
135140
136141 # Check if fields are present in the body
137142 if "fields" in body :
You can’t perform that action at this time.
0 commit comments