-
Notifications
You must be signed in to change notification settings - Fork 87
Schemas are assumed to be objects, not type combinators #96
Copy link
Copy link
Open
Description
openapi/sphinxcontrib/openapi/openapi30.py
Line 260 in 547f645
| yield indent + ':param {type} {name}:'.format( |
This line assumes that every schema it operates on will be {type: string}, {type: object} or soforth, and fails to support the type combinators anyOf, oneOf and allOf when they occur at the top level. While I appreciate that providing a meaningful rendering of such types is challenging, it'd be awesome if the openapi plugin could at least fail gracefully and let a user know what killed it.
File "sphinxcontrib/openapi/openapi30.py", line 262, in _httpresource
type=param['schema']['type'],
KeyError: 'type'
isn't a great UX and hunting down what part of my spec was killing Sphinx took a hot second.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels