ump_spec.schema_export
module ump-spec
Export JSON Schema 2020-12 for every public model (python -m ump_spec export-schemas <dir>).
The exported files are committed under packages/ump-spec/schemas/ and feed the web TS types
(pnpm gen:spec). A test fails if the committed files drift from the models.
Functions
Section titled “Functions”schema_for
Section titled “schema_for”function
def schema_for(name: str) -> dict[str, Any]Source: packages/ump-spec/src/ump_spec/schema_export.py, line 85
all_schemas
Section titled “all_schemas”function
def all_schemas() -> dict[str, dict[str, Any]]Source: packages/ump-spec/src/ump_spec/schema_export.py, line 91
export_schemas
Section titled “export_schemas”function
def export_schemas(out_dir: str | Path) -> list[str]Source: packages/ump-spec/src/ump_spec/schema_export.py, line 95
Constants
Section titled “Constants”| Name | Type | Value | Description |
|---|---|---|---|
SCHEMA_BASE_URI | 'https://schemas.ump.dev/v1/' | ||
JSON_SCHEMA_DIALECT | 'https://json-schema.org/draft/2020-12/schema' | ||
SCHEMA_MODELS | dict[str, type[BaseModel]] | {'estimand': _m.Estimand, 'applies-to': _m.AppliesTo, 'interval': _m.Interval... |