Skip to content

Commit d3fd61d

Browse files
committed
remove child links (collections) in landing page response
1 parent c71a355 commit d3fd61d

File tree

2 files changed

+5
-26
lines changed

2 files changed

+5
-26
lines changed

CHANGES.md

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

33
## [Unreleased]
44

5+
6+
### Changed
7+
8+
- remove `child` links (`collections`) in landing page response
9+
510
## [5.0.2] - 2025-01-30
611

712
### Fixed

stac_fastapi/types/stac_fastapi/types/core.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -415,19 +415,6 @@ def landing_page(self, **kwargs) -> stac.LandingPage:
415415
]
416416
)
417417

418-
# Add Collections links
419-
collections = self.all_collections(request=kwargs["request"])
420-
421-
for collection in collections["collections"]:
422-
landing_page["links"].append(
423-
{
424-
"rel": Relations.child.value,
425-
"type": MimeTypes.json.value,
426-
"title": collection.get("title") or collection.get("id"),
427-
"href": urljoin(base_url, f"collections/{collection['id']}"),
428-
}
429-
)
430-
431418
# Add OpenAPI URL
432419
landing_page["links"].append(
433420
{
@@ -639,19 +626,6 @@ async def landing_page(self, **kwargs) -> stac.LandingPage:
639626
]
640627
)
641628

642-
# Add Collections links
643-
collections = await self.all_collections(request=kwargs["request"])
644-
645-
for collection in collections["collections"]:
646-
landing_page["links"].append(
647-
{
648-
"rel": Relations.child.value,
649-
"type": MimeTypes.json.value,
650-
"title": collection.get("title") or collection.get("id"),
651-
"href": urljoin(base_url, f"collections/{collection['id']}"),
652-
}
653-
)
654-
655629
# Add OpenAPI URL
656630
landing_page["links"].append(
657631
{

0 commit comments

Comments
 (0)