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
After upgrading from 7.3.0, we started getting error: too many parameters on a generated POJO Model of an object that has 255 fields.
Tracked it down to Java/pojo.mustache)
We've tried manually setting x-java-all-args-constructor: false and x-has-readonly-properties: false, but these result in the same error.
As far as I can tell, x-java-all-args-constructor is respected, but x-has-readonly-properties is superseded by the property being read only itself -- which makes sense (see AbstractJavaCodegen.java).
As such, we're unable to instruct the generator to not add these constructors at all.
I understand this was done to fix an issue with Jackson (see #18870 ), but sadly it brings this issue on the other side.
The error happens on the read-only constructor, though. The "all args" one can be disabled correctly.
At the moment I am working around this by adding a vendor extension on the pojo.mustache to allow disabling.
That's reasonable. This won't bring back whatever issue with Jackson was fixed? I assume it needs some way to write these properties, and no setters are present since they are read-only.
Description
After upgrading from
7.3.0
, we started gettingerror: too many parameters
on a generated POJO Model of an object that has 255 fields.Tracked it down to Java/pojo.mustache)
We've tried manually setting
x-java-all-args-constructor: false
andx-has-readonly-properties: false
, but these result in the same error.As far as I can tell,
x-java-all-args-constructor
is respected, butx-has-readonly-properties
is superseded by the property being read only itself -- which makes sense (see AbstractJavaCodegen.java).As such, we're unable to instruct the generator to not add these constructors at all.
I understand this was done to fix an issue with Jackson (see #18870 ), but sadly it brings this issue on the other side.
openapi-generator version
7.9.0
Suggest a fix
Issue: Java/pojo.mustache)
Commit: #18870
The text was updated successfully, but these errors were encountered: