swagger-inflector
swagger-inflector copied to clipboard
Always regenerating controller
Hi,
i would like to use Swagger-Inflector to generate from yaml file server code (interfaces and controller).
After i call code generation (maven, goal install) - code is generated. But when i do some implementation, code is always regenerated and my work is gone.
Here is my pom.xml
<groupId>com.swagger</groupId>
<artifactId>main</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>generated-sources</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.1.5</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>src/main/resources/api.yaml</inputSpec>
<language>inflector</language>
<output>generated-sources/</output>
<configOptions>
<sourceFolder>src/gen</sourceFolder>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-inflector</artifactId>
<version>1.0.6</version>
</dependency>
</dependencies>
</dependencyManagement>
All code is generated into maven module generated-sources. According to documentation swagger-inflector should look for existing controller. Do i need to explictly configure something (add to claspath etc. ...)
Thank you very much
Can you please test using 2.1.6 of the maven plugin?