From c9e6f0defe583405e698a9b1f63fe139be7f023f Mon Sep 17 00:00:00 2001 From: Thomas Maschler Date: Fri, 5 Apr 2024 12:08:27 -0400 Subject: [PATCH] update changelog, remove redundant variable --- CHANGES.md | 4 +++- stac_fastapi/types/stac_fastapi/types/core.py | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ef6012a4b..83746efe5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,7 +6,9 @@ * Update to pydantic v2 and stac_pydantic v3 * Removed internal Search and Operator Types in favor of stac_pydantic Types -* Add switch to choose between TypeDict and StacPydantic response models +* Fix response model validation +* Add Response Model to OpenAPI, even if model validation is turned off +* Use status code 201 for Item/ Collection creation * Add support for Python 3.12 * Replace Black with Ruff Format diff --git a/stac_fastapi/types/stac_fastapi/types/core.py b/stac_fastapi/types/stac_fastapi/types/core.py index bfa77772b..e396c3947 100644 --- a/stac_fastapi/types/stac_fastapi/types/core.py +++ b/stac_fastapi/types/stac_fastapi/types/core.py @@ -378,8 +378,7 @@ def landing_page(self, **kwargs) -> stac.LandingPage: ) # Add Collections links - _collections = self.all_collections(request=kwargs["request"]) - collections = _collections + collections = self.all_collections(request=kwargs["request"]) for collection in collections["collections"]: landing_page["links"].append( @@ -573,8 +572,7 @@ async def landing_page(self, **kwargs) -> stac.LandingPage: ) # Add Collections links - _collections = await self.all_collections(request=kwargs["request"]) - collections = _collections + collections = await self.all_collections(request=kwargs["request"]) for collection in collections["collections"]: landing_page["links"].append(