Skip to content

Schemas are assumed to be objects, not type combinators #96

@arrdem

Description

@arrdem

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions