Skip to content

Commit

Permalink
Add Java generation of OpenAPI spec for validation
Browse files Browse the repository at this point in the history
  • Loading branch information
longnguyencircle committed Aug 24, 2021
1 parent 0671262 commit a635d12
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion hedera-mirror-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@
<sonar.exclusions>pom.xml</sonar.exclusions>
<sonar.sources>${project.basedir}</sonar.sources>
<sonar.javascript.lcov.reportPaths>${project.basedir}/coverage/lcov.info</sonar.javascript.lcov.reportPaths>
<frontend-maven-plugin.version>1.12.0</frontend-maven-plugin.version>
<openapi-generator.version>5.2.1</openapi-generator.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.12.0</version>
<version>${frontend-maven-plugin.version}</version>
<configuration>
<installDirectory>${project.basedir}</installDirectory>
</configuration>
Expand Down Expand Up @@ -113,6 +115,24 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
<!-- Attempt to create the REST API client in Java to validate our OpenAPI spec. -->
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>${openapi-generator.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/api/v1/openapi.yml</inputSpec>
<generatorName>java</generatorName>
<library>jersey2</library>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit a635d12

Please sign in to comment.