Skip to content

Commit 8235d91

Browse files
update stac-version (#762)
1 parent ebb987c commit 8235d91

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
* Add `numberMatched` and `numberReturned` properties in `types.stac.ItemCollection` model
1212
* Add `numberMatched` and `numberReturned` properties in `types.stac.Collections` model
1313

14+
## Changed
15+
16+
* use `stac_pydantic.version.STAC_VERSION` instead of `stac_pydantic.api.version.STAC_API_VERSION` as application `stac_version`
17+
1418
## [3.0.3] - 2024-10-09
1519

1620
### Removed

stac_fastapi/api/stac_fastapi/api/app.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
from fastapi.params import Depends
1111
from stac_pydantic import api
1212
from stac_pydantic.api.collections import Collections
13-
from stac_pydantic.api.version import STAC_API_VERSION
1413
from stac_pydantic.shared import MimeTypes
14+
from stac_pydantic.version import STAC_VERSION
1515
from starlette.middleware import Middleware
1616
from starlette.responses import JSONResponse, Response
1717

@@ -93,7 +93,7 @@ class StacApi:
9393
lambda self: self.settings.stac_fastapi_version, takes_self=True
9494
)
9595
)
96-
stac_version: str = attr.ib(default=STAC_API_VERSION)
96+
stac_version: str = attr.ib(default=STAC_VERSION)
9797
description: str = attr.ib(
9898
default=attr.Factory(
9999
lambda self: self.settings.stac_fastapi_description, takes_self=True

stac_fastapi/types/stac_fastapi/types/core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
from fastapi import Request
99
from geojson_pydantic.geometries import Geometry
1010
from stac_pydantic import Collection, Item, ItemCollection
11-
from stac_pydantic.api.version import STAC_API_VERSION
1211
from stac_pydantic.links import Relations
1312
from stac_pydantic.shared import BBox, MimeTypes
13+
from stac_pydantic.version import STAC_VERSION
1414
from starlette.responses import Response
1515

1616
from stac_fastapi.types import stac
@@ -268,7 +268,7 @@ async def delete_collection(
268268
class LandingPageMixin(abc.ABC):
269269
"""Create a STAC landing page (GET /)."""
270270

271-
stac_version: str = attr.ib(default=STAC_API_VERSION)
271+
stac_version: str = attr.ib(default=STAC_VERSION)
272272
landing_page_id: str = attr.ib(default=api_settings.stac_fastapi_landing_id)
273273
title: str = attr.ib(default=api_settings.stac_fastapi_title)
274274
description: str = attr.ib(default=api_settings.stac_fastapi_description)

0 commit comments

Comments
 (0)