Conversation
MengqinShen
approved these changes
Feb 19, 2026
2713a52 to
a31a8df
Compare
…ema reverse conversion - Add `validate.py`: output schema validation using jsonschema (Draft 2020-12) with SchemaValidationError providing structured error details - Add `picoschema_reverse.py`: JSON Schema to Picoschema reverse conversion supporting objects, arrays, enums, wildcards, nullable types, and descriptions - Add `jsonschema>=4.23.0` dependency to pyproject.toml - Add 22 tests for schema validation (validate_test.py) - Add 17 tests for reverse conversion including round-trip tests (picoschema_reverse_test.py) - Update DOTPROMPT_PARITY.md: fix stale Python entries - Recursive partials: 🔶 → ✅ (cycle detection already implemented) - Schema validation: 🔶 → ✅ (jsonschema added) - Schema validation errors: 🔶 → ✅ - JSON Schema → Picoschema: 🔶 → ✅ (reverse conversion added) - spec/helpers/: 🔶 → ✅ (all spec tests pass) - spec/partials.yaml: 🔶 → ✅ (all spec tests pass) - Spec Tests: 🔶 → ✅ (343+ tests) - Mark Q1 2026 Python spec test coverage as done - Update last-updated date to 2026-02-19 All 343 tests pass.
a31a8df to
5371411
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes Python parity gaps in dotprompt by adding two new modules and updating the parity documentation.
Changes
New: Output Schema Validation (
validate.py)validate_output(data, schema)validates rendered output against JSON Schema usingjsonschema(Draft 2020-12)SchemaValidationErrorwith structured error details (path + message for each violation)New: JSON Schema to Picoschema Reverse Conversion (
picoschema_reverse.py)json_schema_to_picoschema(schema)converts JSON Schema back to compact Picoschema notation(*)), nullable types, descriptions, optional fieldsUpdated: DOTPROMPT_PARITY.md
Fixed stale Python entries where features were already implemented but marked as partial:
jsonschemavalidation addedSchemaValidationErrorwith structured errorspicoschema_reverse.pyaddedspec/helpers/spec/partials.yamlAlso marked Q1 2026 "Python specification test coverage" as done.
Dependency
jsonschema>=4.23.0topyproject.tomlTest Results
All existing tests continue to pass. 39 new tests added (22 validation + 17 reverse conversion).