Skip to content

Instantly share code, notes, and snippets.

@Nxtra
Last active January 16, 2021 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Nxtra/4c92fa9a6c2fb62a8c606128ae8ca87f to your computer and use it in GitHub Desktop.
Save Nxtra/4c92fa9a6c2fb62a8c606128ae8ca87f to your computer and use it in GitHub Desktop.
An example of how to configure the openapi-generator plugin for your maven projects
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<skipValidateSpec>false</skipValidateSpec>
<inputSpec>openapi.yaml</inputSpec>
<output>${project.basedir}</output>
<generatorName>java</generatorName>
<addCompileSourceRoot>true</addCompileSourceRoot>
<skipOverwrite>false</skipOverwrite>
<modelNameSuffix>Dto</modelNameSuffix>
<modelPackage>be.ordina.conference.api.model</modelPackage>
<generateModels>true</generateModels>
<generateModelTests>false</generateModelTests>
<generateModelDocumentation>true</generateModelDocumentation>
<generateApis>false</generateApis>
<generateSupportingFiles>false</generateSupportingFiles>
<library>jersey2</library>
<verbose>true</verbose>
<configOptions>
<dateLibrary>java8-localdatetime</dateLibrary>
<java8>true</java8>
<useBeanValidation>true</useBeanValidation>
<sourceFolder>src/java</sourceFolder>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment