Skip to content

Conversation

@jemacineiras
Copy link
Contributor

#368 Additional properties false generates invalid java code with map, string

…p field

When additionalProperties is explicitly set to false, the generator should not
create a Map field. Previously, any presence of additionalProperties would
generate a Map regardless of its boolean value.

Changes:
- ModelBuilder.java: Updated processAdditionalProperties() to check if boolean
  false and skip Map generation
- ModelBuilder.java: Updated setFieldType() to handle boolean false case
- ModelBuilder.java: Updated getMapTypeObject() to safely handle boolean nodes
- Added testAdditionalPropertiesFalse test case with YAML, expected DTO, and API
- Bump patch version to 6.3.2 (bug fix)

Fixes issue #367: additionalProperties false generates invalid Java code"
…lse-generates-invalid-java-code-with-mapstring
@jemacineiras jemacineiras requested a review from apenlor December 11, 2025 11:55
@jemacineiras jemacineiras self-assigned this Dec 11, 2025
@jemacineiras jemacineiras added release Adding this tag to a PR will cause a release on merge maven Adding this tag to a PR will create a new maven version on merge labels Dec 11, 2025
@jemacineiras jemacineiras added the gradle Adding this tag to a PR will create a new gradle version on merge label Dec 11, 2025
apenlor
apenlor previously approved these changes Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gradle Adding this tag to a PR will create a new gradle version on merge maven Adding this tag to a PR will create a new maven version on merge release Adding this tag to a PR will cause a release on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

additionalProperties:false generates invalid Java code with Map<String,>

3 participants