-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java code generation fails with id & setId field names #20484
Comments
please give it a try with the name mapping option: https://github.com/openapitools/openapi-generator/blob/master/docs/customization.md#name-mapping |
I am using the Maven plugin and could not determine how to use the name mapper with the plugin, How would I add that to the configOptions?
|
Here is an example of what I tried and it didn't work.
|
I just figured out how to do this, it must be set in the configuration element group and then set like this:
|
Description
I have a Java model class that has these fields (and more).
private String id;
private String setId;
openapi-generator version
7.10.0
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
The issue is that the codegen tool has correctly made the setId() method for the id field but then it makes another setId() method for the setId field which is incorrect. It should be making a setSetId() method for the setId field.
How to fix/resolve this?
The text was updated successfully, but these errors were encountered: