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
Is your feature request related to a problem? Please describe.
Property names on models are (mostly) camelCased when using Spring openapi-generator and there is no way to configure and change this behavior.
I understand the usual need of conforming to Java Beans convention, but on my case we don't need the conformity and would like to have the property names on models to be of the original names on the spec file.
This helps in reducing code and use less reflection (get the original name from Schema annotation of the field) by just using the same naming conventions.
Is your feature request related to a problem? Please describe.
Property names on models are (mostly) camelCased when using Spring openapi-generator and there is no way to configure and change this behavior.
I understand the usual need of conforming to Java Beans convention, but on my case we don't need the conformity and would like to have the property names on models to be of the original names on the spec file.
This helps in reducing code and use less reflection (get the original name from Schema annotation of the field) by just using the same naming conventions.
e.g.)
Spec
Generated model (Current behavior)
Generated model (Desired behavior)
Describe the solution you'd like
Add an option to keep the original property names from spec for Spring generators.
Describe alternatives you've considered
Option A
Generate file that contains all property names, and add one-to-one entry as
nameMappings
.Option B
Extend SpringCodeGen and override toVarName etc methods and publish as library.
Additional context
Other generators (scala, typescript) have
modelPropertyNaming
that can be set tooriginal
as configurable option that does this.The text was updated successfully, but these errors were encountered: