|
7 | 7 | from fastapi import FastAPI |
8 | 8 |
|
9 | 9 | from stac_fastapi.api.app import StacApi |
10 | | -from stac_fastapi.api.models import create_get_request_model, create_post_request_model |
| 10 | +from stac_fastapi.api.models import ( |
| 11 | + ItemCollectionUri, |
| 12 | + create_get_request_model, |
| 13 | + create_post_request_model, |
| 14 | + create_request_model, |
| 15 | +) |
11 | 16 | from stac_fastapi.core.core import ( |
12 | 17 | BulkTransactionsClient, |
13 | 18 | CoreClient, |
|
33 | 38 | TransactionExtension, |
34 | 39 | ) |
35 | 40 | from stac_fastapi.extensions.core.filter import FilterConformanceClasses |
| 41 | +from stac_fastapi.extensions.core.sort import SortConformanceClasses |
36 | 42 | from stac_fastapi.extensions.third_party import BulkTransactionExtension |
37 | 43 | from stac_fastapi.opensearch.config import OpensearchSettings |
38 | 44 | from stac_fastapi.opensearch.database_logic import ( |
|
115 | 121 |
|
116 | 122 | post_request_model = create_post_request_model(search_extensions) |
117 | 123 |
|
| 124 | +items_get_request_model = create_request_model( |
| 125 | + model_name="ItemCollectionUri", |
| 126 | + base_model=ItemCollectionUri, |
| 127 | + extensions=[ |
| 128 | + SortExtension( |
| 129 | + conformance_classes=[SortConformanceClasses.ITEMS], |
| 130 | + ) |
| 131 | + ], |
| 132 | + request_type="GET", |
| 133 | +) |
| 134 | + |
118 | 135 | app_config = { |
119 | 136 | "title": os.getenv("STAC_FASTAPI_TITLE", "stac-fastapi-opensearch"), |
120 | 137 | "description": os.getenv("STAC_FASTAPI_DESCRIPTION", "stac-fastapi-opensearch"), |
|
129 | 146 | ), |
130 | 147 | "search_get_request_model": create_get_request_model(search_extensions), |
131 | 148 | "search_post_request_model": post_request_model, |
| 149 | + "items_get_request_model": items_get_request_model, |
132 | 150 | "route_dependencies": get_route_dependencies(), |
133 | 151 | } |
134 | 152 |
|
|
0 commit comments