diff --git a/CHANGES.md b/CHANGES.md index 40ae54933..732d59178 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Changed + +- remove `child` links (`collections`) in landing page response + ## [5.0.3] - 2025-03-03 ### Added @@ -588,7 +592,7 @@ Full changelog: https://stac-utils.github.io/stac-fastapi/migrations/v3.0.0/#cha * First PyPi release! [Unreleased]: -[5.0.3]: +[5.0.3]: [5.0.2]: [5.0.1]: [5.0.0]: diff --git a/stac_fastapi/types/stac_fastapi/types/core.py b/stac_fastapi/types/stac_fastapi/types/core.py index e4ad4d252..4796f5849 100644 --- a/stac_fastapi/types/stac_fastapi/types/core.py +++ b/stac_fastapi/types/stac_fastapi/types/core.py @@ -415,19 +415,6 @@ def landing_page(self, **kwargs) -> stac.LandingPage: ] ) - # Add Collections links - collections = self.all_collections(request=kwargs["request"]) - - for collection in collections["collections"]: - landing_page["links"].append( - { - "rel": Relations.child.value, - "type": MimeTypes.json.value, - "title": collection.get("title") or collection.get("id"), - "href": urljoin(base_url, f"collections/{collection['id']}"), - } - ) - # Add OpenAPI URL landing_page["links"].append( { @@ -639,19 +626,6 @@ async def landing_page(self, **kwargs) -> stac.LandingPage: ] ) - # Add Collections links - collections = await self.all_collections(request=kwargs["request"]) - - for collection in collections["collections"]: - landing_page["links"].append( - { - "rel": Relations.child.value, - "type": MimeTypes.json.value, - "title": collection.get("title") or collection.get("id"), - "href": urljoin(base_url, f"collections/{collection['id']}"), - } - ) - # Add OpenAPI URL landing_page["links"].append( {