Repository navigation
RelPrim 0.11.0
Summary
RelPrim 0.11.0 adds optional JSON Schema and Pydantic validation adapters to the existing validation system.
Both integrations implement RelPrim's existing validator abstraction, so they work with validation policies, retries, fallbacks, structured events and execution reports without introducing new execution paths.
JSON Schema validation
The new JSONSchemaValidator and json_schema_validator() adapter use the jsonschema package to validate operation results.
The adapter:
- selects the JSON Schema draft using the schema's
$schemadeclaration; - validates schemas at adapter construction time;
- produces concise validation reasons with instance paths;
- keeps invalid schemas separate from normal result-validation failures;
- never mutates or transforms operation results.
Install it with pip install "relprim[jsonschema]".
Pydantic validation
The new PydanticValidator and pydantic_validator() adapter integrate Pydantic v2 models through model_validate().
The adapter:
- supports normal Pydantic validation semantics;
- optionally supports strict validation;
- produces concise error reasons with field locations and error types;
- never replaces the operation result with the temporary validated model.
Install it with pip install "relprim[pydantic]".
Existing validation semantics
Both adapters use the existing RelPrim validation pipeline.
Validation failures continue to participate in:
ValidationFailedError;- retry policies;
- fallback execution;
- structured validation events;
- execution-report metadata.
No adapter-specific retry or fallback machinery was added.
Dependency model
JSON Schema and Pydantic remain optional dependencies.
Installing the base relprim package does not install or import either integration.
Typing
The Validator protocol now exposes its name as a read-only property, allowing immutable validator implementations to satisfy the protocol cleanly under strict mypy without changing runtime behavior.
Scope
This release adds validation adapters only.
RelPrim does not transform validated values, implement JSON Schema itself, replace Pydantic models or introduce a second validation subsystem.
With the currently planned feature work complete, the next milestone focuses on API hardening and stability before RelPrim 1.0.