Skip to content

Schema resolution

schema_resolution

Schema traversal used to materialize bundle-local pointer targets.

Functions:

schema_for_pointer

schema_for_pointer(schema: Mapping[str, Any], parts: list[str]) -> Mapping[str, Any] | None

Return the producer-schema node that describes a JSON Pointer target.

Parameters:

Name Type Description Default
schema Mapping[str, Any]

Root producer JSON Schema.

required
parts list[str]

Decoded JSON Pointer path segments.

required

Returns:

Type Description
Mapping[str, Any] | None

The target schema node, or None when it cannot be determined.

schema_references

schema_references(schema: Mapping[str, Any], root: Mapping[str, Any]) -> tuple[str, ...]

Return external references identified by a target producer-schema node.

Parameters:

Name Type Description Default
schema Mapping[str, Any]

Schema node for the resolved pointer target.

required
root Mapping[str, Any]

Root producer JSON Schema used to resolve local references.

required

Returns:

Type Description
tuple[str, ...]

External schema references, in schema order.