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
Describe the bug
The configuration I'm generating a client for declares parameters with in: body, the generation fails with openapi-python-client version: 0.5.4 however:
ERROR parsing POST /alerts within alert. Endpoint will not be generated.
Parameter must be declared in path or query
Parameter(name='alerts', param_in='body', description='The alerts to create', required=True, deprecated=False, allowEmptyValue=False, style=None, explode=False, allowReserved=False, param_schema=Reference(ref='#/definitions/postableAlerts'), example=None, examples=None, content=None)
To Reproduce
Steps to reproduce the behavior: openapi-python-client generate --url https://raw.githubusercontent.com/prometheus/alertmanager/master/api/v2/openapi.yaml
Hey @filippog - consider upgrading your spec from openapi 2.0 to openapi 3.0 using a tool like this: https://mermade.org.uk/openapi-converter
It seems this tool is mostly focused on openapi 3.0 support.
Thanks for answering this @dtkav! You're 100% correct in that this tool only supports OpenAPI 3. I should probably add a note about that to the README and maybe even check for the top level swagger key and emit an early error.
dbanty
changed the title
in: body parameters not parsed
Add a note about supported OpenAPI versions
Sep 2, 2020
Describe the bug
The configuration I'm generating a client for declares
parameters
within: body
, the generation fails with openapi-python-client version: 0.5.4 however:To Reproduce
Steps to reproduce the behavior:
openapi-python-client generate --url https://raw.githubusercontent.com/prometheus/alertmanager/master/api/v2/openapi.yaml
I'm not familiar with OpenAPI specs and versions, e.g. if this is relevant? https://swagger.io/docs/specification/2-0/describing-request-body/
The text was updated successfully, but these errors were encountered: