@@ -207,23 +207,29 @@ def normalizator(
207207 validators parameter for detailed description.
208208 :
209209 """
210- # Very first step is to expand references in the schema itself
210+ # Very first step is to expand references in the schema itself:
211211 expand_refs (schema )
212+
213+ # Now we can expand references in the property value:
212214 if isinstance (property_value , dict ):
213215 expand_refs (property_value )
216+
217+ # Now we can validate the entries:
218+
219+ # TODO: Delete all the below commented-out code if tests pass (simplified above)
214220 # resolver_registry: Registry = get_ref_resolver_registry(schema)
215221 # ref_resolver: Resolver = resolver_registry.resolver()
216222
217- def resolve (subschema : dict [str , Any ]) -> dict [str , Any ]:
218- # if "$ref" in subschema:
219- # try:
220- # resolved = ref_resolver.lookup(subschema["$ref"]).contents
221- # except Unresolvable as e:
222- # raise ValidationError(
223- # f"Failed to resolve $ref '{subschema['$ref']}' from {ref_resolver!r} and schema {schema!r}: {e}"
224- # ) from e
225- # return cast(dict[str, Any], resolved)
226- return subschema
223+ # def resolve(subschema: dict[str, Any]) -> dict[str, Any]:
224+ # if "$ref" in subschema:
225+ # try:
226+ # resolved = ref_resolver.lookup(subschema["$ref"]).contents
227+ # except Unresolvable as e:
228+ # raise ValidationError(
229+ # f"Failed to resolve $ref '{subschema['$ref']}' from {ref_resolver!r} and schema {schema!r}: {e}"
230+ # ) from e
231+ # return cast(dict[str, Any], resolved)
232+ # return subschema
227233
228234 # Transform object and array values before running json schema type checking for each element.
229235 # Recursively normalize every value of the "instance" sub-object,
0 commit comments