From 8686c9e265bb734c334cc0918c268fdfc02a6249 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Mon, 23 Jan 2023 07:45:49 -0500 Subject: [PATCH] support paths in item IDs --- pygeoapi/flask_app.py | 2 +- pygeoapi/starlette_app.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pygeoapi/flask_app.py b/pygeoapi/flask_app.py index 7eebf3b..e1edecd 100644 --- a/pygeoapi/flask_app.py +++ b/pygeoapi/flask_app.py @@ -180,7 +180,7 @@ def collection_queryables(collection_id=None): @BLUEPRINT.route('/collections//items', methods=['GET', 'POST']) -@BLUEPRINT.route('/collections//items/', +@BLUEPRINT.route('/collections//items/', methods=['GET', 'PUT', 'DELETE']) def collection_items(collection_id, item_id=None): """ diff --git a/pygeoapi/starlette_app.py b/pygeoapi/starlette_app.py index 8bada0b..e93f1fe 100644 --- a/pygeoapi/starlette_app.py +++ b/pygeoapi/starlette_app.py @@ -244,9 +244,9 @@ async def get_collection_items_tiles(request: Request, collection_id=None, @app.route('/collections/{collection_id:path}/items', methods=['GET', 'POST']) @app.route('/collections/{collection_id:path}/items/', methods=['GET', 'POST']) -@app.route('/collections/{collection_id:path}/items/{item_id}', +@app.route('/collections/{collection_id:path}/items/{item_id:path}', methods=['GET', 'PUT', 'DELETE']) -@app.route('/collections/{collection_id:path}/items/{item_id}/', +@app.route('/collections/{collection_id:path}/items/{item_id:path}/', methods=['GET', 'PUT', 'DELETE']) async def collection_items(request: Request, collection_id=None, item_id=None): """