Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update conformance and spec urls #691

Merged
merged 1 commit into from
May 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,20 @@ class TransactionExtension(ApiExtension):
PUT /collections/{collection_id}/items
DELETE /collections/{collection_id}/items

https://github.com/radiantearth/stac-api-spec/blob/master/ogcapi-features/extensions/transaction/README.md
https://github.com/stac-api-extensions/transaction
https://github.com/stac-api-extensions/collection-transaction

Attributes:
client: CRUD application logic

"""

client: Union[AsyncBaseTransactionsClient, BaseTransactionsClient] = attr.ib()
settings: ApiSettings = attr.ib()
conformance_classes: List[str] = attr.ib(
factory=lambda: [
"https://api.stacspec.org/v1.0.0-rc.3/ogcapi-features/extensions/transaction",
"https://api.stacspec.org/v1.0.0/ogcapi-features/extensions/transaction",
"https://api.stacspec.org/v1.0.0/collections/extensions/transaction",
]
)
schema_href: Optional[str] = attr.ib(default=None)
Expand Down Expand Up @@ -132,6 +135,11 @@ def register_delete_item(self):
endpoint=create_async_endpoint(self.client.delete_item, ItemUri),
)

def register_patch_item(self):
"""Register patch item endpoint (PATCH
/collections/{collection_id}/items/{item_id})."""
raise NotImplementedError
vincentsarago marked this conversation as resolved.
Show resolved Hide resolved

def register_create_collection(self):
"""Register create collection endpoint (POST /collections)."""
self.router.add_api_route(
Expand Down Expand Up @@ -196,6 +204,10 @@ def register_delete_collection(self):
endpoint=create_async_endpoint(self.client.delete_collection, CollectionUri),
)

def register_patch_collection(self):
"""Register patch collection endpoint (PATCH /collections/{collection_id})."""
raise NotImplementedError

def register(self, app: FastAPI) -> None:
"""Register the extension with a FastAPI application.

Expand Down