|
3 | 3 | # |
4 | 4 |
|
5 | 5 | import logging |
6 | | -from copy import deepcopy |
7 | 6 | from enum import Flag, auto |
8 | | -from typing import TYPE_CHECKING, Any, Callable, Dict, Generator, Mapping, Optional, cast |
| 7 | +from typing import Any, Callable, Dict, Generator, Mapping, Optional, cast |
9 | 8 |
|
10 | 9 | from jsonschema import Draft7Validator, ValidationError, validators |
11 | 10 | from jsonschema.protocols import Validator |
12 | | -from referencing import Registry, Resource |
13 | | -from referencing._core import Resolver |
14 | | -from referencing.exceptions import Unresolvable |
15 | | -from referencing.jsonschema import DRAFT7 |
16 | | - |
17 | | -from airbyte_cdk.sources.utils.schema_helpers import expand_refs |
18 | | - |
19 | | -from .schema_helpers import get_ref_resolver_registry |
20 | 11 |
|
21 | 12 | MAX_NESTING_DEPTH = 3 |
22 | 13 | json_to_python_simple = { |
@@ -201,15 +192,6 @@ def normalizator( |
201 | 192 | validators parameter for detailed description. |
202 | 193 | : |
203 | 194 | """ |
204 | | - # Very first step is to expand $refs in the schema itself: |
205 | | - expand_refs(schema) |
206 | | - |
207 | | - # Now we can expand $refs in the property value: |
208 | | - if isinstance(property_value, dict): |
209 | | - expand_refs(property_value) |
210 | | - |
211 | | - # Now we can validate and normalize the values: |
212 | | - |
213 | 195 | # Transform object and array values before running json schema type checking for each element. |
214 | 196 | # Recursively normalize every value of the "instance" sub-object, |
215 | 197 | # if "instance" is an incorrect type - skip recursive normalization of "instance" |
|
0 commit comments