Skip to content

Commit ecf0037

Browse files
fix: remove partial listing of collections from landing page (stac-utils#496)
**Related Issue(s):** - stac-utils#495 **Description:** Removes the "child" links to collections from the landing page. Since collection pagination was implemented, an incomplete list of these "child" links was returned on the landing page. In order to avoid confusion, it is better to remove this partial listing of collections from the landing page. **PR Checklist:** - [x] Code is formatted and linted (run `pre-commit run --all-files`) - [x] Tests pass (run `make test`) - [x] Documentation has been updated to reflect changes, if applicable - [x] Changes are added to the changelog --------- Co-authored-by: Jonathan Healy <[email protected]>
1 parent 226be85 commit ecf0037

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1919

2020
- Removed ENV_MAX_LIMIT environment variable; maximum limits are now handled by the default global limit environment variable. [#482](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/482)
2121
- Changed the default and maximum pagination limits for collections/items endpoints. [#482](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/482)
22+
- Removed the `rel=child` links to the collections from the landing page, as the listing was incomplete due to pagination. [#496](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/496)
2223

2324
### Fixed
2425

stac_fastapi/core/stac_fastapi/core/core.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,6 @@ async def landing_page(self, **kwargs) -> stac_types.LandingPage:
201201
]
202202
)
203203

204-
collections = await self.all_collections(request=kwargs["request"])
205-
for collection in collections["collections"]:
206-
landing_page["links"].append(
207-
{
208-
"rel": Relations.child.value,
209-
"type": MimeTypes.json.value,
210-
"title": collection.get("title") or collection.get("id"),
211-
"href": urljoin(base_url, f"collections/{collection['id']}"),
212-
}
213-
)
214-
215204
# Add OpenAPI URL
216205
landing_page["links"].append(
217206
{

0 commit comments

Comments
 (0)