Resolve and inline JSON Schema $ref references in a schema object.
This function processes a JSON Schema and resolves all $ref references by
replacing them with the actual referenced content.
Handles both simple references and complex cases like circular references and mixed
$ref objects that contain additional properties alongside the $ref.
dereference_refs(
schema_obj: dict,
*,
full_schema: dict | None = None,
skip_keys: Sequence[str] | None = None
) -> dict$ref objects (with both $ref and other properties) are supported$refs override resolved properties$defs section is preserved in the output by default| Name | Type | Description |
|---|---|---|
schema_obj* | dict | The JSON Schema object or fragment to process. This can be a complete schema or just a portion of one. |
full_schema | dict | None | Default: NoneThe complete schema containing all definitions that If not provided, defaults to |
skip_keys | Sequence[str] | None | Default: NoneControls recursion behavior and reference resolution depth.
|