|
OpenQuizz
Une application de gestion des contenus pédagogiques
|
Data Structures | |
| class | OpenAPIVersion |
Functions | |
| def | build_reference (component_type, openapi_major_version, component_name) |
| def | validate_spec (spec) |
| def | trim_docstring (docstring) |
| def | dedent (content) |
| def | deepupdate (original, update) |
Variables | |
| dictionary | COMPONENT_SUBSECTIONS |
Various utilities for parsing OpenAPI operations from docstrings and validating against the OpenAPI spec.
| def apispec.utils.build_reference | ( | component_type, | |
| openapi_major_version, | |||
| component_name | |||
| ) |
Return path to reference :param str component_type: Component type (schema, parameter, response, security_scheme) :param int openapi_major_version: OpenAPI major version (2 or 3) :param str component_name: Name of component to reference
| def apispec.utils.dedent | ( | content | ) |
Remove leading indent from a block of text. Used when generating descriptions from docstrings. Note that python's `textwrap.dedent` doesn't quite cut it, as it fails to dedent multiline docstrings that include unindented text on the initial line.
| def apispec.utils.deepupdate | ( | original, | |
| update | |||
| ) |
Recursively update a dict. Subdict's won't be overwritten but also updated.
| def apispec.utils.trim_docstring | ( | docstring | ) |
Uniformly trims leading/trailing whitespace from docstrings. Based on http://www.python.org/peps/pep-0257.html#handling-docstring-indentation
| def apispec.utils.validate_spec | ( | spec | ) |
Validate the output of an :class:`APISpec` object against the
OpenAPI specification.
Note: Requires installing apispec with the ``[validation]`` extras.
::
pip install 'apispec[validation]'
:raise: apispec.exceptions.OpenAPIError if validation fails.
| dictionary COMPONENT_SUBSECTIONS |