File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 85
85
else :
86
86
collections_get_request_model = EmptyRequest
87
87
88
- post_request_model = create_post_request_model (extensions , base_model = PgstacSearch )
88
+ post_request_model = create_post_request_model (
89
+ extensions + collection_extensions , base_model = PgstacSearch
90
+ )
89
91
get_request_model = create_get_request_model (extensions + collection_extensions )
90
92
91
93
api = StacApi (
96
98
items_get_request_model = items_get_request_model ,
97
99
search_get_request_model = get_request_model ,
98
100
search_post_request_model = post_request_model ,
99
- collections_get_request_model = collections_get_request_model ,
100
101
)
101
102
app = api .app
102
103
Original file line number Diff line number Diff line change 14
14
from pygeofilter .parsers .cql2_text import parse as parse_cql2_text
15
15
from pypgstac .hydration import hydrate
16
16
from stac_fastapi .api .models import JSONResponse
17
- from stac_fastapi .extensions .core .collection_search .request import (
18
- BaseCollectionSearchPostRequest ,
19
- )
20
17
from stac_fastapi .types .core import AsyncBaseCoreClient , Relations
21
18
from stac_fastapi .types .errors import InvalidQueryParameter , NotFoundError
22
19
from stac_fastapi .types .requests import get_base_url
41
38
class CoreCrudClient (AsyncBaseCoreClient ):
42
39
"""Client for core endpoints defined by stac."""
43
40
44
- collections_post_request_model : BaseCollectionSearchPostRequest = attr .ib (
45
- default = BaseCollectionSearchPostRequest
46
- )
47
-
48
41
async def all_collections ( # noqa: C901
49
42
self ,
50
43
request : Request ,
@@ -88,8 +81,7 @@ async def all_collections( # noqa: C901
88
81
89
82
# Do the request
90
83
try :
91
- search_request = self .collections_post_request_model (** clean )
92
- # search_request = self.post_request_model(**clean)
84
+ search_request = self .post_request_model (** clean )
93
85
except ValidationError as e :
94
86
raise HTTPException (
95
87
status_code = 400 , detail = f"Invalid parameters provided { e } "
You can’t perform that action at this time.
0 commit comments