hydromodpy.schema.export#
Full JSON Schema export for the HydroModPy configuration.
Produces three companion JSON files ready to be consumed by an external frontend that renders a formular without having to know anything about Python:
config.json- the full JSON Schema ofHydroModPyConfig.config_meta.json- high-level metadata (ordered root sections,UI groups, per-section titles).
field_validators.json- flat mappingfield_path -> validator_typeso the frontend can pick a widget + a local validator without re-parsing the schema.
The exporter reuses hydromodpy.config.schema_export for the raw
Pydantic schema and adds the two companion documents on top.
Usage:
from hydromodpy.schema import export_full_schema
export_full_schema("./schema/")
CLI:
hmp schema export --output ./schema/
Functions
|
Return metadata describing the TOML layout (sections, order, groups). |
|
Flatten every root-level field into a |
|
Write the three companion JSON files into output_dir. |