Swagger codegen to Java Spring generates incorrect file response entity from OpenAPI component of binary format
In the end, I switched from
<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>3.0.14</version>
...
</plugin>
to
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>4.2.3</version>
...
</plugin>
This plugin got it right and generates Resource instead of ResponseEntity