paidiverpy.utils.schema_json_handler

paidiverpy.utils.schema_json_handler#

Schema JSON handler module.

Functions#

generate_schema(→ None)

Generate the schema for the configuration model.

wrap_ref(→ dict[str, Any] | list[Any])

Wrap a reference in the schema with a key.

Module Contents#

paidiverpy.utils.schema_json_handler.generate_schema(output_path: str) None[source]#

Generate the schema for the configuration model.

Parameters:

output_path (str) – The path to save the schema.

paidiverpy.utils.schema_json_handler.wrap_ref(schema: dict[str, Any], target_ref: str, wrapper_key: str) dict[str, Any] | list[Any][source]#

Wrap a reference in the schema with a key.

Parameters:
  • schema (dict) – The original schema.

  • target_ref (str) – The reference to wrap.

  • wrapper_key (str) – The key to wrap the reference with.

Returns:

The modified schema with the reference wrapped.

Return type:

dict