MDL098 - No Model Registered for Schema Version¶
Description¶
The model layer was asked to validate against an
schema_version for which no Pydantic model is registered in
_MODEL_BY_VERSION (see
validators/model.py).
The engine fails fast rather than silently coercing to the default
model — silent coercion would mask the misconfiguration and produce
misleading downstream errors.
Category¶
Model Errors
Severity¶
error
Common Causes¶
- The caller passed an
schema_versionstring the engine doesn't know about (e.g. a typo, a future-version pin, or a CI environment that wasn't refreshed after a UNTP upgrade). - A custom build of dppvalidator removed a model registration
without also removing the version from
SCHEMA_REGISTRY.
How to Fix¶
- Check the registered versions —
dppvalidator schema listprints every version_MODEL_BY_VERSIONknows about. The error message also lists them under theavailablefield. - Pin a registered version when constructing the engine, or
omit
schema_versionentirely to let auto-detection pick from the payload's@context. - If you need a new version, follow the recipe in
.claude/rules/untp-versioning.md(or the/untp-bump <X.Y.Z>slash command). Adding a version requires touching_MODEL_BY_VERSION,SCHEMA_REGISTRY, and a handful of related dispatch tables — see the rule for the full minimum touch list.
Example¶
Python
from dppvalidator.validators import ValidationEngine
# Wrong — "0.5.0" isn't registered.
engine = ValidationEngine(schema_version="0.5.0")
result = engine.validate(payload)
# result.errors[0].code == "MDL098"
# result.errors[0].context["requested_version"] == "0.5.0"
# Right — register one of the supported versions, or auto-detect.
engine = ValidationEngine(schema_version="0.7.0")
See Also¶
- VER001 - UNTP version mismatch — the engine-vs-payload version mismatch (different failure mode, same family).
- UNTP DPP versions
- Error Overview