swagger-api / swagger-api/swagger-codegen
[Java, Maven] swagger-codegen-maven-plugin, how invoke build without cleaning existing folders Issue: Bug
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I have the following swagger-codegen-maven-plugin.
How do I run this plugin so it DOES NOT blow away existing output in this folder (i.e. implement flag cleanOutputDir in org.codehaus.mojo jaxb2-maven-plugin)
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.2.2</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<output>${project.build.directory}</output>
specify the swagger yaml
<inputSpec>src/main/resources/swagger/swagger.yaml</inputSpec>
target to generate java client code
<language>jaxrs-cxf</language>
<configOptions>
<sourceFolder>generated</sourceFolder>
<dateLibrary>joda</dateLibrary>
<apiPackage>com.api</apiPackage>
<modelPackage>com.api.model</modelPackage>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
Swagger-codegen version
2.2.2
Swagger declaration file content or url
N/A
Command line used for generation
N/A
Steps to reproduce
N/A
Related issues
N/A
Suggest a Fix
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 with the swagger-codegen-maven-plugin generate goal and its output configuration in version 2.2.2. Reproduce the behavior with the provided Maven configuration, then determine the current handling of existing output and define completion as preserving existing folders or documenting the supported configuration; no source file, test, or command is named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100