Closed
Description
Description
Using an OpenAPI 3 definition, one needs to use Springdoc not springfox.
This used to work with openapi-generator-maven-plugin 4.3.1 with the springdoc-openapi-ui dependency included in the pom.xml.
However, upgrading to plugin version 5.0.1 suddenly expects springfox dependency and in the generated Api files there is this import import springfox.documentation.annotations.ApiIgnore;
which breaks the build.
This import is actually not used, and after removing it manually it compiles successfully.
openapi-generator version
5.0.1 regression (used to work in 4.3.1)
Generation Details
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>5.0.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<id>api</id>
<configuration>
<inputSpec>${basedir}/src/main/resources/api/api.yaml</inputSpec>
<generatorName>spring</generatorName>
<apiPackage>com.test.data.api</apiPackage>
<modelPackage>com.test.data.model</modelPackage>
<configOptions>
<java8>true</java8>
<dateLibrary>java8</dateLibrary>
<interfaceOnly>true</interfaceOnly>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
Steps to reproduce
Include the following dependencies in the Maven pom.xml file.
<dependency>
<groupId>io.swagger.parser.v3</groupId>
<artifactId>swagger-parser</artifactId>
<version>2.0.24</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.5.5</version>
</dependency>
Generate any openapi 3.0.
Suggest a fix
Remove any reference to Springfox in the generated API files, especially if they are not even used.