Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JAVA] Bag. property generateApis=false not working #14119

Closed
iWantUss opened this issue Nov 25, 2022 · 1 comment · Fixed by #14126
Closed

[JAVA] Bag. property generateApis=false not working #14119

iWantUss opened this issue Nov 25, 2022 · 1 comment · Fixed by #14126

Comments

@iWantUss
Copy link
Contributor

iWantUss commented Nov 25, 2022

Description

property generateApis always true

org.openapitools.codegen.DefaultGenerator:208

generateApis = GlobalSettings.getProperty(CodegenConstants.APIS) != null ? Boolean.TRUE : getGeneratorPropertyDefaultSwitch(CodegenConstants.APIS, null);
openapi-generator version

5.0.1
6.2.1

OpenAPI declaration file content or url
<plugins>
            <plugin>
                <groupId>org.openapitools</groupId>
                <artifactId>openapi-generator-maven-plugin</artifactId>
                <version>6.2.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <inputSpec>
                                ${project.basedir}/src/main/resources/swagger.json
                            </inputSpec>
                            <generatorName>java</generatorName>
                            <library>resttemplate</library>
                            <generateApiTests>false</generateApiTests>
                            <generateModelTests>false</generateModelTests>
                            <modelPackage>com.test</modelPackage>
                            <generateApis>false</generateApis>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
</plugins>
Generation Details
<generateApis>false</generateApis>
Steps to reproduce

generate with openapi-generator-maven-plugin

Suggest a fix

org.openapitools.codegen.DefaultGenerator:208

edit method configureGeneratorProperties()

generateApis = GlobalSettings.getProperty(CodegenConstants.APIS) != null ? Boolean.valueOf(GlobalSettings.getProperty(CodegenConstants.APIS)) : getGeneratorPropertyDefaultSwitch(CodegenConstants.APIS, null);
@iWantUss iWantUss changed the title [BUG][JAVA] property generateApis=false not working [BUG] [JAVA] property generateApis=false not working Nov 25, 2022
@iWantUss iWantUss changed the title [BUG] [JAVA] property generateApis=false not working [BUG][JAVA] property generateApis=false not working Nov 25, 2022
@iWantUss iWantUss changed the title [BUG][JAVA] property generateApis=false not working [JAVA] Bag. property generateApis=false not working Nov 27, 2022
@iWantUss
Copy link
Contributor Author

Duplicate #4506
Resolve:

<configuration>
    <!-- ... -->
    <generateApis>false</generateApis>
    <generateSupportingFiles>false</generateSupportingFiles>
   <!-- ... -->
</configuration>

@iWantUss iWantUss closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant