Open davidkarlsen opened 4 days ago
When generating code with latest maven plugin 7.10.0 it will generate non-compilable code.
7.10.0
<plugin> <groupId>org.openapitools</groupId> <artifactId>openapi-generator-maven-plugin</artifactId> <executions> <execution> <goals> <goal>generate</goal> </goals> <configuration> <inputSpec>${project.basedir}/src/main/resources/bring/bring-postalcode-api-contract.yml</inputSpec> <skipValidateSpec>true</skipValidateSpec> <generatorName>spring</generatorName> <library>spring-http-interface</library> <apiPackage>org.mypkg.clients.bring.generated.api</apiPackage> <configOptions> <!-- see https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.5.0 - conflicts with lombok --> <sourceFolder>src/gen/java/main</sourceFolder> <dateLibrary>java8</dateLibrary> <useTags>true</useTags> </configOptions> </configuration> </execution> </executions> </plugin>
Use above config and use spring-boot 3.4.0. The actual openapi in question shouldn't match too much.
https://github.com/OpenAPITools/openapi-generator/issues/19712
HttpServiceProxyFactory.builder().build().createClient(PostalCodeApi.class);
instead of
HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build();
one can avoid this code to be generated by setting flag:
<generateSupportingFiles>false</generateSupportingFiles>
Bug Report Checklist
Description
When generating code with latest maven plugin 7.10.0 it will generate non-compilable code.
openapi-generator version
7.10.0
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Use above config and use spring-boot 3.4.0. The actual openapi in question shouldn't match too much.
Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/issues/19712
Suggest a fix
instead of