Open chrylis opened 4 years ago
I have exaclty the same problem while migrating from swagger-codegen to openapi-generator. Swagger codegen is able to handle that and generate an alias for HashMap<String, Money>.
same here. have been thinking how to have a workaround :( I dont think this is fixed in v6 either
Description
I have a type
Money
and a typeMoneyTuple
, which simply hasadditionalProperties: $ref: '#/Money'
. Despite that the properties are all typed, the Java generator decides that this is a "free-form object" and doesn't output a DTO for it. Other types ref'ingMoneyTuple
then fail.The equivalent code
NumberTuple
where the values arenumber
s works as expected.openapi-generator version
I'm using OpenAPI Generator 4.3.1 from the Maven plugin.
OpenAPI declaration file content or url
Generation Details
I am using the Maven plugin with
<generateAliasAsModel>true</generateAliasAsModel>
.