Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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