build_schema_validator_with_globals
No overview available.
def build_schema_validator_with_globals(
schema: dict,
globals: dict
) - > jsonschema.protocols.Validator
Constructs a JSON schema validator that incorporates a set of global definitions for cross-schema referencing. This is used to ensure that individual schemas can resolve shared components or common data structures defined in a central registry.
Parameters
| Name | Type | Description |
|---|---|---|
| schema | dict | The primary JSON schema used to validate data instances. |
| globals | dict | A dictionary of shared schema definitions that are injected into the validator's scope for resolution. |
Returns
| Type | Description |
|---|---|
jsonschema.protocols.Validator | A validator instance configured with the provided schema and a resolver that handles global references. |