Bug Report Checklist
Description
I override the type array from java.util.List to java.util.Collection. This works perfectly fine for input arguments. However, when only the return class of the interface method is a Collection the import is not added.
pom.xml
<typeMappings>array=Collection</typeMappings>
<importMappings>
<importMapping>Collection=java.util.Collection</importMapping>
</importMappings>
generatedResource.java
package ...
<-- expecting java.util.Collection import here, but not added
...
Collection<MyClass> myMethod()
...
openapi-generator version
6.2.1
OpenAPI declaration file content or url
If you post the code inline, please wrap it with
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/MyClass'
Generation Details
generated with maven plugin
Steps to reproduce
generate code with yaml as input and the specified configuration
Related issues/PRs
Suggest a fix
Bug Report Checklist
Description
I override the type array from java.util.List to java.util.Collection. This works perfectly fine for input arguments. However, when only the return class of the interface method is a Collection the import is not added.
pom.xml
generatedResource.java
openapi-generator version
6.2.1
OpenAPI declaration file content or url
If you post the code inline, please wrap it with
Generation Details
generated with maven plugin
Steps to reproduce
generate code with yaml as input and the specified configuration
Related issues/PRs
Suggest a fix