sphinx-contrib / openapi

OpenAPI (fka Swagger) spec renderer for Sphinx.
https://sphinxcontrib-openapi.readthedocs.io
BSD 2-Clause "Simplified" License
109 stars 79 forks source link

Support OpenAPI v3 parameters content #90

Open dpgaspar opened 4 years ago

dpgaspar commented 4 years ago

document generation crashes with:

Exception occurred:
  File ".../venv_sphinx/lib/python3.6/site-packages/sphinxcontrib/openapi/openapi30.py", line 281, in _httpresource
    type=param['schema']['type'],
KeyError: 'schema'

since it does not seem to support parameters with content

https://swagger.io/docs/specification/describing-parameters/

ikalnytskyi commented 4 years ago

This issue does not exist in experimental new renderer.

https://github.com/sphinx-contrib/openapi/blob/227ef532eef5e8d21003ce0a77afc687c92944c3/sphinxcontrib/openapi/renderers/_httpdomain.py#L246-L250

Since current renderer is so hard to maintain and, I believe, this is not the only issue it has with following OpenAPI 3 spec, I simply luck any desire to work on this. Sorry. :(

I'll try my best to finish new renderer as soon as possible and enable it by default on next release.