OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
20.61k stars 6.29k forks source link

[BUG] [Java] BaseApi not found #18779

Open JuMp3 opened 1 month ago

JuMp3 commented 1 month ago

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>
JuMp3 commented 1 month ago

removing the following tags, it works

<generateSupportingFiles>true</generateSupportingFiles>
                            <supportingFilesToGenerate>
                                HttpBearerAuth.java,Authentication.java,JavaTimeFormatter.java,ApiKeyAuth.java,RFC3339DateFormat.java
                            </supportingFilesToGenerate>