Swagger-codegen: [swagger-codegen-maven-plugin] generateApis(false) is not working

Created on 10 Aug 2018  路  4Comments  路  Source: swagger-api/swagger-codegen

  • Pom config
            <plugin>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-codegen-maven-plugin</artifactId>
                <version>2.3.1</version>
                <executions>
                    <execution>
                        <id>lcm-generate</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <inputSpec>${project.basedir}/src/main/resources/SOL003.lcm.json</inputSpec>
                            <language>java</language>
                            <configOptions>
                                <sourceFolder>src/gen/java/main</sourceFolder>
                                <generateApis>false</generateApis>
                                <generateApiTests>false</generateApiTests>
                                <generateModelTests>false</generateModelTests>
                            </configOptions>
                            <output>${project.build.directory}/generated-sources</output>
                        </configuration>
                    </execution>
               <executions>
       <plugin>

I only want to generate the model codes by using the above configuration in pom. But there is still api codes are generated. Is there something missed in the pom?

Most helpful comment

It works after put generateApis and other options in the same level as "language" instead

All 4 comments

It works after put generateApis and other options in the same level as "language" instead

Bless you, yuanpli.
This solved my crash, and points to a bug.

@yuanpli Thank you very much! It helped me!

its solved my problem tks

Was this page helpful?
0 / 5 - 0 ratings