Skip to content

Develop#55

Merged
yojo-generator merged 7 commits intomasterfrom
develop
Apr 30, 2026
Merged

Develop#55
yojo-generator merged 7 commits intomasterfrom
develop

Conversation

@yojo-generator
Copy link
Copy Markdown
Owner

No description provided.

- 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)
@yojo-generator yojo-generator merged commit 58573ec into master Apr 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant