json_schema_utils#
- build_schema_registry_from_dir(schemas_dir: Path, mutate: Callable[[Path, Dict[str, Any]], None] | None = None) Registry[source]#
- inject_image_content_types(typedefs: Dict[str, Any], content_types: List[str]) None[source]#
Inject dynamic enum values into typedefs, e.g. for contentType. So that they are read from single source of truth in code and not duplicated verbatim in the schema file.
- Parameters:
typedefs (Dict[str, Any]) – The typedefs schema dictionary to modify in place.