File: openapi.py

package info (click to toggle)
python-openapi-core 0.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,104 kB
  • sloc: python: 19,979; makefile: 44
file content (14 lines) | stat: -rw-r--r-- 437 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from pathlib import Path

import yaml
from jsonschema_path import SchemaPath

from openapi_core.contrib.falcon.middlewares import FalconOpenAPIMiddleware

openapi_spec_path = Path("tests/integration/data/v3.0/petstore.yaml")
spec_dict = yaml.load(openapi_spec_path.read_text(), yaml.Loader)
spec = SchemaPath.from_dict(spec_dict)
openapi_middleware = FalconOpenAPIMiddleware.from_spec(
    spec,
    extra_media_type_deserializers={},
)