Develop#55
Merged
yojo-generator merged 7 commits intomasterfrom Apr 30, 2026
Merged
Conversation
- Add GenerationComparisonTestBase for comparing generated code with expected output - Create 16 test classes for 8 contracts (with and without Lombok) - Update expected files in src/test/resources/example/expected/ - Add GenerateExpectedFilesTest utility for updating expected files - Add TESTING.md documentation
- Added discriminatorField property to Schema.java - Modified SchemaMapper.processDiscriminators() to pass discriminator field name to subtypes - Added isDiscriminatorField flag to VariableProperties.java with getter/setter - Modified VariableProperties.toWrite() to generate @JsonTypeId annotation - Added JSON_TYPE_ID_ANNOTATION and JSON_TYPE_ID_IMPORT constants to Dictionary.java - Updated expected test files (Cat.java, Dog.java now have @JsonTypeId) - Added tests to verify @JsonTypeId presence in discriminator subtypes - All tests pass (16 tests)
- Added @JsonTypeId annotation example in discriminator section - Updated roadmap to show @JsonTypeId as completed feature
- Remove uncapitalize() call in AbstractMapper to respect contract casing - Update MapperUtilTest with case preservation tests - Bump version to 3.1.1 (patch release) - Update expected test files to reflect preserved case
- Add pre-scan for discriminator base schemas to identify inheritance - Skip fields from discriminator base schemas in mergeProperties (inherited via extends) - Place @JsonTypeId on discriminator field in BASE class (Pet.java) per Variant 1 - Set extendsFrom for subtypes (Cat/Dog extend Pet) - Update expected test files to match new discriminator behavior - All discriminator tests now pass (with and without Lombok)
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.
No description provided.