Skip to content

Commit f0a52bb

Browse files
committed
remove references from normalization
1 parent 20ae208 commit f0a52bb

File tree

2 files changed

+17
-32
lines changed

2 files changed

+17
-32
lines changed

airbyte_cdk/sources/utils/transform.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,11 @@
33
#
44

55
import logging
6-
from copy import deepcopy
76
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
98

109
from jsonschema import Draft7Validator, ValidationError, validators
1110
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
2011

2112
MAX_NESTING_DEPTH = 3
2213
json_to_python_simple = {
@@ -201,15 +192,6 @@ def normalizator(
201192
validators parameter for detailed description.
202193
:
203194
"""
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-
213195
# Transform object and array values before running json schema type checking for each element.
214196
# Recursively normalize every value of the "instance" sub-object,
215197
# if "instance" is an incorrect type - skip recursive normalization of "instance"

0 commit comments

Comments
 (0)