Add JSON schema 2020-12 single file output#5
Merged
mbarlow12 merged 2 commits intoNov 17, 2025
Conversation
Add option to generate a single consolidated schema file that conforms to JSON Schema 2020-12 specification using $defs and $ref constructs. Features: - New --single-file CLI option to enable consolidated output - New --single-file-name option to customize the output filename - Configuration support via single_file and single_file_name settings - Generates schema with $schema, $id, $defs structure - All models are organized under $defs for easy referencing - Comprehensive test coverage for new functionality - Updated documentation in README.md and CLAUDE.md The consolidated schema uses JSON Schema 2020-12 format with: - $schema pointing to https://json-schema.org/draft/2020-12/schema - $defs containing all model definitions - Proper $id and metadata fields
Add comprehensive CLI tests for the single-file JSON Schema output feature: - Test basic single-file mode - Test custom filename option - Test multiple modules consolidation - Test verbose output with single-file mode This increases test coverage from 83% to 89%, exceeding the required 85% threshold. Also includes auto-formatting fixes from ruff.
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.
Add option to generate a single consolidated schema file that conforms to JSON Schema 2020-12 specification using $defs and $ref constructs.
Features:
The consolidated schema uses JSON Schema 2020-12 format with: