singer_sdk.singerlib.schema.resolve_schema_references

singer_sdk.singerlib.schema.resolve_schema_references(schema, refs=None)[source]

Resolves and replaces json-schema $refs with the appropriate dict.

Recursively walks the given schema dict, converting every instance of $ref in a ‘properties’ structure with a resolved dict.

This modifies the input schema and also returns it.

Parameters:
  • schema (dict[str, Any]) – The schema dict

  • refs (dict[str, str] | None) – A dict of <string, dict> which forms a store of referenced schemata.

Returns:

A schema dict with all $refs replaced with the appropriate dict.

Return type:

dict