diff --git a/stac_fastapi/extensions/stac_fastapi/extensions/core/transaction.py b/stac_fastapi/extensions/stac_fastapi/extensions/core/transaction.py index bed4e09b7..0ebcc6194 100644 --- a/stac_fastapi/extensions/stac_fastapi/extensions/core/transaction.py +++ b/stac_fastapi/extensions/stac_fastapi/extensions/core/transaction.py @@ -128,7 +128,7 @@ def register_update_collection(self): response_model_exclude_none=True, methods=["PUT"], endpoint=create_async_endpoint( - self.client.update_collection, CollectionUri, stac_types.Collection + self.client.update_collection, stac_types.Collection ), ) diff --git a/stac_fastapi/types/stac_fastapi/types/core.py b/stac_fastapi/types/stac_fastapi/types/core.py index 096da42a3..70d74447d 100644 --- a/stac_fastapi/types/stac_fastapi/types/core.py +++ b/stac_fastapi/types/stac_fastapi/types/core.py @@ -215,17 +215,18 @@ async def create_collection( @abc.abstractmethod async 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 - exists. The update should do a diff against the saved collection and + 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: id of the existing collection to be updated + collection: the updated collection (must be complete) Returns: The updated collection.