swagger-api / swagger-api/swagger-codegen
[Java] generateApiTests=false not working
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
swagger-codegen-maven-plugin ignore the generateApiTests=false option
after mvn install test package present in generated sources and contains tests for api
plugin section in pom
<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/api/api.yaml</inputSpec>
<language>java</language>
<library>resttemplate</library>
<output>${project.build.directory}/generated-sources/openapi</output>
<apiPackage>org.openapitools.api</apiPackage>
<modelPackage>org.openapitools.model</modelPackage>
<invokerPackage>org.openapitools.invoker</invokerPackage>
<generateApiTests>false</generateApiTests>
<generateApiDocumentation>false</generateApiDocumentation>
<generateModelTests>false</generateModelTests>
<generateModelDocumentation>false</generateModelDocumentation>
<configOptions>
<dateLibrary>java8-localdatetime</dateLibrary>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
Swagger-codegen version
3.0.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Maven plugin's generate goal with the configuration shown, especially generateApiTests=false, and inspect the Java generator's handling of that option. Done means the generated sources contain no API test classes while the other configured generation options still behave as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100