diff --git a/CHANGES.md b/CHANGES.md index 14529ef8..0eb44508 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -81,14 +81,18 @@ Note: Minor version `0.X.0` update might break the API, It's recommended to pin print(items_list["next"]) # Next Offset print(items_list["prev"]) # Previous Offset ``` +- rename `catalog_dependency` attribute to `collections_dependency` -- move `/collections` QueryParameters in the `CatalogParams` dependency +- move the `collections_dependency` attribute from the `EndpointsFactory` to `OGCFeaturesFactory` class -- the `CatalogParams` now returns a `CollectionList` object +- move `/collections` QueryParameters in the `CollectionsParams` dependency + +- rename `CatalogParams` to `CollectionsParams` + +- the `CollectionsParams` now returns a `CollectionList` object - move `s_intersects` and `t_intersects` functions from `tipg.factory` to `tipg.dependencies` -- move the `catalog_dependency` attribute from the `EndpointsFactory` to `OGCFeaturesFactory` class ## [0.4.4] - 2023-10-03 diff --git a/tipg/dependencies.py b/tipg/dependencies.py index cd4bf280..c8d7b676 100644 --- a/tipg/dependencies.py +++ b/tipg/dependencies.py @@ -430,7 +430,7 @@ def CollectionParams( ) -def CatalogParams( +def CollectionsParams( request: Request, bbox_filter: Annotated[Optional[List[float]], Depends(bbox_query)], datetime_filter: Annotated[Optional[List[str]], Depends(datetime_query)], diff --git a/tipg/factory.py b/tipg/factory.py index 04046699..5023080e 100644 --- a/tipg/factory.py +++ b/tipg/factory.py @@ -18,8 +18,8 @@ from tipg import model from tipg.collections import Collection, CollectionList from tipg.dependencies import ( - CatalogParams, CollectionParams, + CollectionsParams, ItemsOutputType, OutputType, QueryablesOutputType, @@ -331,8 +331,8 @@ def landing( class OGCFeaturesFactory(EndpointsFactory): """OGC Features Endpoints Factory.""" - # catalog dependency - catalog_dependency: Callable[..., CollectionList] = CatalogParams + # collections dependency + collections_dependency: Callable[..., CollectionList] = CollectionsParams @property def conforms_to(self) -> List[str]: @@ -414,7 +414,7 @@ def collections( request: Request, collection_list: Annotated[ CollectionList, - Depends(self.catalog_dependency), + Depends(self.collections_dependency), ], output_type: Annotated[ Optional[MediaType], @@ -1819,7 +1819,7 @@ class Endpoints(EndpointsFactory): """OGC Features and Tiles Endpoints Factory.""" # OGC Features dependency - catalog_dependency: Callable[..., CollectionList] = CatalogParams + collections_dependency: Callable[..., CollectionList] = CollectionsParams # OGC Tiles dependency supported_tms: TileMatrixSets = default_tms @@ -1846,7 +1846,7 @@ def links(self, request: Request) -> List[model.Link]: def register_routes(self): """Register factory Routes.""" self.ogc_features = OGCFeaturesFactory( - catalog_dependency=self.catalog_dependency, + collections_dependency=self.collections_dependency, collection_dependency=self.collection_dependency, router_prefix=self.router_prefix, templates=self.templates,