Skip to content

Instantly share code, notes, and snippets.

@kaveenr
Last active January 13, 2019 03:47
Show Gist options
  • Save kaveenr/e38b3cac1807dbbba5c081d44685c6d2 to your computer and use it in GitHub Desktop.
Save kaveenr/e38b3cac1807dbbba5c081d44685c6d2 to your computer and use it in GitHub Desktop.
Maven-codegen POM
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.4.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<!-- Skip Code Generation Parameter -->
<skip>false</skip>
<inputSpec>${project.basedir}/src/main/resources/swagger.yaml</inputSpec>
<language>jaxrs-cxf</language>
<configOptions>
<sourceFolder>src/main/java/</sourceFolder>
<useGenericResponse>true</useGenericResponse>
</configOptions>
<generateApiTests>false</generateApiTests>
<modelPackage>com.kaveenrodrigo.blog.codegen.sample.models</modelPackage>
<apiPackage>com.kaveenrodrigo.blog.codegen.sample.api</apiPackage>
<invokerPackage>com.kaveenrodrigo.blog.codegen.sample.api.impl</invokerPackage>
<modelNameSuffix>DTO</modelNameSuffix>
<output>${project.basedir}</output>
</configuration>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment