Skip to content

Commit b1eb8e6

Browse files
committed
fix return types
1 parent 7b22afd commit b1eb8e6

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2525
### Fixed
2626
- Improved performance of `mk_actions` and `filter-links` methods [#351](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/351)
2727
- Fixed inheritance relating to BaseDatabaseSettings and ApiBaseSettings [#355](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/355)
28+
- Fixed delete_item and delete_collection methods return types [#355](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/355)
2829

2930
## [v3.2.5] - 2025-04-07
3031

stac_fastapi/core/stac_fastapi/core/core.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -731,17 +731,15 @@ async def update_item(
731731
return ItemSerializer.db_to_stac(item, base_url)
732732

733733
@overrides
734-
async def delete_item(
735-
self, item_id: str, collection_id: str, **kwargs
736-
) -> Optional[stac_types.Item]:
734+
async def delete_item(self, item_id: str, collection_id: str, **kwargs) -> None:
737735
"""Delete an item from a collection.
738736
739737
Args:
740738
item_id (str): The identifier of the item to delete.
741739
collection_id (str): The identifier of the collection that contains the item.
742740
743741
Returns:
744-
Optional[stac_types.Item]: The deleted item, or `None` if the item was successfully deleted.
742+
None: Returns 204 No Content on successful deletion
745743
"""
746744
await self.database.delete_item(item_id=item_id, collection_id=collection_id)
747745
return None
@@ -811,23 +809,20 @@ async def update_collection(
811809
)
812810

813811
@overrides
814-
async def delete_collection(
815-
self, collection_id: str, **kwargs
816-
) -> Optional[stac_types.Collection]:
812+
async def delete_collection(self, collection_id: str, **kwargs) -> None:
817813
"""
818814
Delete a collection.
819815
820816
This method deletes an existing collection in the database.
821817
822818
Args:
823-
collection_id (str): The identifier of the collection that contains the item.
824-
kwargs: Additional keyword arguments.
819+
collection_id (str): The identifier of the collection to delete
825820
826821
Returns:
827-
None.
822+
None: Returns 204 No Content on successful deletion
828823
829824
Raises:
830-
NotFoundError: If the collection doesn't exist.
825+
NotFoundError: If the collection doesn't exist
831826
"""
832827
await self.database.delete_collection(collection_id=collection_id)
833828
return None

0 commit comments

Comments
 (0)