You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Hello,
I recently updated openapi-generator-maven-plugin from Version 7.9.0 to 7.10.0. The new version seems to have problems when generating inner enums with BigDecimal fields. The generated Code produces compiler errors, because it tries to create instances of BigDecimal with
BigDecimal.valueOf(newBigDecimal("0"))
BigDecimals valueOf method has no such singnature.
openapi-generator version
Version 7.10.0
Generation Details
The maven configuration of the generator plugin looks like this:
I found this PR PR-19815 which seems to introduce the issue. The template file modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache:26 now defines to use the .valueOf method, which doesn't work for type BigDecimal if the argument also is a BigDecimal.
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
Hello,
I recently updated openapi-generator-maven-plugin from Version 7.9.0 to 7.10.0. The new version seems to have problems when generating inner enums with BigDecimal fields. The generated Code produces compiler errors, because it tries to create instances of BigDecimal with
BigDecimals valueOf method has no such singnature.
openapi-generator version
Version 7.10.0
Generation Details
The maven configuration of the generator plugin looks like this:
Generated Output
With version 7.9.0 the inner enums are looking good:
Version 7.10.0 produces:
Suggest a fix
I found this PR PR-19815 which seems to introduce the issue. The template file modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache:26 now defines to use the .valueOf method, which doesn't work for type BigDecimal if the argument also is a BigDecimal.
The text was updated successfully, but these errors were encountered: