File: spec_validator_cls.rst

package info (click to toggle)
python-openapi-core 0.19.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,008 kB
  • sloc: python: 18,868; makefile: 47
file content (16 lines) | stat: -rw-r--r-- 456 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Specification validation
========================

By default, on OpenAPI creation time, the provided specification is also validated.

If you know you have a valid specification already, disabling the validator can improve the performance.

.. code-block:: python
  :emphasize-lines: 1,4,6

    from openapi_core import Config

    config = Config(
       spec_validator_cls=None,
    )
    openapi = OpenAPI.from_file_path('openapi.json', config=config)