File tree Expand file tree Collapse file tree 4 files changed +82
-48
lines changed Expand file tree Collapse file tree 4 files changed +82
-48
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def handle_discriminator(
5353 return
5454
5555 try :
56- validator .resolver . resolve (ref )
56+ validator ._validate_reference (ref = ref , instance = instance )
5757 except :
5858 yield ValidationError (
5959 f"{ instance !r} reference { ref !r} could not be resolved" ,
Original file line number Diff line number Diff line change 33from typing import Type
44
55from jsonschema import _legacy_validators
6- from jsonschema import _utils
76from jsonschema import _validators
8- from jsonschema .protocols import Validator
97from jsonschema .validators import Draft202012Validator
108from jsonschema .validators import create
119from jsonschema .validators import extend
10+ from jsonschema_specifications import REGISTRY as SPECIFICATIONS
1211
1312from openapi_schema_validator import _format as oas_format
1413from openapi_schema_validator import _types as oas_types
1514from openapi_schema_validator import _validators as oas_validators
1615from openapi_schema_validator ._types import oas31_type_checker
1716
1817OAS30Validator = create (
19- meta_schema = _utils .load_schema ("draft4" ),
18+ meta_schema = SPECIFICATIONS .contents (
19+ "http://json-schema.org/draft-04/schema#" ,
20+ ),
2021 validators = {
2122 "multipleOf" : _validators .multipleOf ,
2223 # exclusiveMaximum supported inside maximum_draft3_draft4
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ strict = true
2020module = " jsonschema.*"
2121ignore_missing_imports = true
2222
23+ [[tool .mypy .overrides ]]
24+ module = " jsonschema_specifications"
25+ ignore_missing_imports = true
26+
2327[[tool .mypy .overrides ]]
2428module = " rfc3339_validator"
2529ignore_missing_imports = true
@@ -51,8 +55,9 @@ include = [
5155
5256[tool .poetry .dependencies ]
5357python = " ^3.8.0"
54- jsonschema = " >=4.0.0,<4. 18.0 "
58+ jsonschema = { version = " ^4. 18.0a1 " , allow-prereleases = true }
5559rfc3339-validator = " *" # requred by jsonschema for date-time checker
60+ jsonschema-specifications = " ^2023.5.2"
5661
5762[tool .poetry .extras ]
5863docs = [" sphinx" , " sphinx-immaterial" ]
You can’t perform that action at this time.
0 commit comments