Closed AlexTrotsenko closed 1 year ago
I've noticed this behaviour with a values
attribute as well, which behaves similarly producing a propertyValues
attribute in the generated Kotlin class. I'm not sure if there are other reserved words this may be affected by, but have seen this behaviour with both entries
and values
bump this bug. I am trying to upgrade from 5.2.0 to 5.4.0. And I see this issue. And I cannot make the upgrade until this issue is resolved.
I could repeat the "issue" (property name escaped with property
prefix) with the latest master.
Recently we've added a new feature called nameMappings
to let users have complete control of the property name, e.g.
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g kotlin -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o /tmp/kotlin/ --name-mappings entries=theEntries
This example maps entries
to theEntries
to showcase the feature. You can map it back to just entries
with --name-mappings entries=entries
I have following definition of the DTO in the open-api spec:
In the output all the properties are generated with the same name as in the openapi spec, but
entries
becomepropertyEntries
for unknown reason.Here is my set-up:
...