openapi-generator
openapi-generator copied to clipboard
[BUG] [Java] BaseApi not found
After updating the library to the latest version, 7.6.0, I get an error while building the project: all xxApi java classes extend now a new class "BaseApi", which however was not found
example:
public class UsersCaseApi extends BaseApi ...
and this is the IDE error:
cannot find symbol
this is my openapi-generator-maven-plugin config in pom.xml
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>7.6.0</version>
<executions>
<execution>
<id>crmOpenapi-generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<skipOverwrite>true</skipOverwrite>
<inputSpec>${project.basedir}/src/main/resources/openapi/entitlement-user-sign.yaml
</inputSpec>
<generatorName>java</generatorName>
<apiPackage>com.xxx.yyy.client.entitlementusersignservice.api
</apiPackage>
<modelPackage>com.xxx.yyy.client.entitlementusersignservice.model
</modelPackage>
<groupId>${project.groupId}</groupId>
<artifactId>entitlementUserSignClient</artifactId>
<artifactVersion>${project.version}</artifactVersion>
<generateSupportingFiles>true</generateSupportingFiles>
<supportingFilesToGenerate>
HttpBearerAuth.java,Authentication.java,JavaTimeFormatter.java,ApiKeyAuth.java,RFC3339DateFormat.java
</supportingFilesToGenerate>
<generateModelTests>false</generateModelTests>
<generateModelDocumentation>false</generateModelDocumentation>
<generateApiTests>false</generateApiTests>
<generateApiDocumentation>false</generateApiDocumentation>
<configOptions>
<library>resttemplate</library>
<dateLibrary>java8-localdatetime</dateLibrary>
<enablePostProcessFile>false</enablePostProcessFile>
<openApiNullable>false</openApiNullable>
<useJakartaEe>true</useJakartaEe>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
removing the following tags, it works
<generateSupportingFiles>true</generateSupportingFiles>
<supportingFilesToGenerate>
HttpBearerAuth.java,Authentication.java,JavaTimeFormatter.java,ApiKeyAuth.java,RFC3339DateFormat.java
</supportingFilesToGenerate>
If you still want to configure your "supporting files", you can simply add "BaseApi.java" to it and everything works again.