File: __init__.py

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 (26 lines) | stat: -rw-r--r-- 850 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from openapi_schema_validator import OAS30ReadValidator
from openapi_schema_validator import OAS30WriteValidator
from openapi_schema_validator import OAS31Validator

from openapi_core.validation.schemas.factories import SchemaValidatorsFactory

__all__ = [
    "oas30_write_schema_validators_factory",
    "oas30_read_schema_validators_factory",
    "oas31_schema_validators_factory",
]

oas30_write_schema_validators_factory = SchemaValidatorsFactory(
    OAS30WriteValidator,
)

oas30_read_schema_validators_factory = SchemaValidatorsFactory(
    OAS30ReadValidator,
)

oas31_schema_validators_factory = SchemaValidatorsFactory(
    OAS31Validator,
    # FIXME: OpenAPI 3.1 schema validator uses OpenAPI 3.0 format checker.
    # See https://github.com/python-openapi/openapi-core/issues/506
    format_checker=OAS30ReadValidator.FORMAT_CHECKER,
)