Skip to content

Commit 3c4ce2e

Browse files
add numberMatched/Returned properties in model (#759)
1 parent 8ed4e8b commit 3c4ce2e

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

CHANGES.md

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

33
## [Unreleased]
44

5+
### Removed
6+
7+
* Remove deprecated `context` property in `types.stac.ItemCollection` model
8+
9+
### Added
10+
11+
* Add `numberMatched` and `numberReturned` properties in `types.stac.ItemCollection` model
12+
513
## [3.0.3] - 2024-10-09
614

715
### Removed

docs/src/tips-and-tricks.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,6 @@ middlewares=[lambda app: CORSMiddleware(app, allow_origins=["*"])]
2020

2121
If needed, you can edit the `allow_origins` parameter to only allow CORS requests from specific origins.
2222

23-
## Enable the Context extension
24-
25-
!!! Warning
26-
27-
The `ContextExtension` is deprecated and will be removed in 3.0. See https://github.com/radiantearth/stac-api-spec/issues/396
28-
29-
The Context STAC extension provides information on the number of items matched and returned from a STAC search.
30-
This is required by various other STAC-related tools, such as the pystac command-line client.
31-
To enable the extension, edit your backend's `app.py` and add the following import:
32-
33-
```python
34-
from stac_fastapi.extensions.core.context import ContextExtension
35-
```
36-
37-
38-
and then edit the `api = StacApi(...` call to add `ContextExtension()` to the list given as the `extensions` parameter.
39-
4023
## Set API title, description and version
4124

4225
For the landing page, you can set the API title, description and version using environment variables.

stac_fastapi/types/stac_fastapi/types/stac.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ class ItemCollection(TypedDict, total=False):
7373
type: Literal["FeatureCollection"]
7474
features: List[Item]
7575
links: List[Dict[str, Any]]
76-
context: Optional[Dict[str, int]]
76+
numberMatched: Optional[int]
77+
numberReturned: Optional[int]
7778

7879

7980
class Collections(TypedDict, total=False):

0 commit comments

Comments
 (0)