Skip to content

Commit

Permalink
Update collection update endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysrevans3 committed Feb 14, 2024
1 parent 3b5b093 commit 2040400
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## [Unreleased]

* Updated the collection update endpoint to match with the collection-transaction extension. ([#630](https://github.com/stac-utils/stac-fastapi/issues/630))

## [2.4.9] - 2023-11-17

### Added
Expand Down
9 changes: 5 additions & 4 deletions stac_fastapi/types/stac_fastapi/types/core.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Base clients."""

import abc
from datetime import datetime
from typing import Any, Dict, List, Optional, Union
Expand Down Expand Up @@ -101,18 +102,18 @@ def create_collection(

@abc.abstractmethod
def update_collection(
self, collection: stac_types.Collection, **kwargs
self, collection_id: str, collection: stac_types.Collection, **kwargs
) -> Optional[Union[stac_types.Collection, Response]]:
"""Perform a complete update on an existing collection.
Called with `PUT /collections`. It is expected that this item already
Called with `PUT /collections/{collection_id}`. It is expected that this item already
exists. The update should do a diff against the saved collection and
perform any necessary updates. Partial updates are not supported by the
transactions extension.
Args:
collection: the collection (must be complete)
collection_id: the id of the collection from the resource path
collection_id: id of the existing collection to be updated
collection: the updated collection (must be complete)
Returns:
The updated collection.
Expand Down

0 comments on commit 2040400

Please sign in to comment.