You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the OpenAPI JSON produced by stac-fastapi to set up the API in Azure API Management. When validating the OpenAPI JSON, I get the following error
Declared path parameter "collection_id" needs to be defined within every operation in the path (missing in "put", "post"), or moved to the path-level parameters object
This can be fixed by manually editing the OpenAPI JSON and adding:
into the definitions for the PUT and POST requests for /collections/{collection_id}/items.
I've tried to work out how to fix this myself, and have tracked it down to the differences between the code in register_get_item_collection in app.py and register_create_item and register_update_item in transaction.py. The former defines a request model:
@robintw I believe this is actually related to #406 and #384. Those endpoints did not include the {collection_id} in the request model, and I am guessing that is why they do not show up in the OpenAPI JSON. I'm working on a PR to address those issues and I'll let you know if it fixes this one as well.
I'm trying to use the OpenAPI JSON produced by stac-fastapi to set up the API in Azure API Management. When validating the OpenAPI JSON, I get the following error
This can be fixed by manually editing the OpenAPI JSON and adding:
into the definitions for the PUT and POST requests for
/collections/{collection_id}/items
.I've tried to work out how to fix this myself, and have tracked it down to the differences between the code in
register_get_item_collection
inapp.py
andregister_create_item
andregister_update_item
intransaction.py
. The former defines a request model:that specifies the collection_id path parameter. But the latter only specify a request model of
Item
which doesn't have that path parameter.I've tried creating a new request model of:
and using that as the request model as follows:
But that doesn't seem to fix the OpenAPI JSON.
I'm happy to put in a PR to fix this, if someone can give me some advice on where/how to fix it.
The text was updated successfully, but these errors were encountered: