OpenAPITools / OpenAPITools/openapi-generator

[BUG] [Java] BaseApi not found

Open
#18,779 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

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>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the pom.xml configuration and the generated xxApi Java classes, focusing on the supportingFilesToGenerate list and the new BaseApi reference. Compare the generated API output with the supporting files produced by the Java generator; done means a clean build where every generated API superclass is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.