Swagger Codegen has some logic which selects type names for generated models and for properties.
This handles both mapping to build-in types of the programming language (e.g. for Java int/double/String/BigDecimal/UUID/...) and name conversion (e.g. case change, escaping for reserved words, model name prefix/suffix) for types defined in the API definition file (mainly object and enum types).
Currently the code is a bit convoluted, which leads to bugs like #3678 (where the suffix/prefix is applied to a build-in type).
Solution proposal
This logic needs to be refactored to separate both functions clearly. Any name modifications should only be applied to for API defined types, not to build-in types of the programming language.
(I guess handling of maps/lists would also be part of this.)
Swagger Codegen has some logic which selects type names for generated models and for properties.
This handles both mapping to build-in types of the programming language (e.g. for Java int/double/String/BigDecimal/UUID/...) and name conversion (e.g. case change, escaping for reserved words, model name prefix/suffix) for types defined in the API definition file (mainly object and enum types).
Currently the code is a bit convoluted, which leads to bugs like #3678 (where the suffix/prefix is applied to a build-in type).
Solution proposal
This logic needs to be refactored to separate both functions clearly. Any name modifications should only be applied to for API defined types, not to build-in types of the programming language.
(I guess handling of maps/lists would also be part of this.)