diff options
author | Renu Kumari <renu.kumari@bell.ca> | 2021-07-22 11:53:53 -0400 |
---|---|---|
committer | Renu Kumari <renu.kumari@bell.ca> | 2021-07-23 08:39:12 -0400 |
commit | 22fe2165bed771fdd4c452891646076aecb22ac3 (patch) | |
tree | c40ba41a039ae4f275b6eea0ff62dbc77f76d50d /pom.xml | |
parent | 092d4a0b4eb6011b16d223f0c1d5072fdb5f6abb (diff) |
generating swagger-ui and controller interface using openapi.yml
Issue-ID: CPS-387
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: I3e9742407148efcb16d8d79411e4de6738796f86
Diffstat (limited to 'pom.xml')
-rwxr-xr-x | pom.xml | 60 |
1 files changed, 58 insertions, 2 deletions
@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + + SPDX-License-Identifier: Apache-2.0 ============LICENSE_END========================================================= --> @@ -36,7 +38,6 @@ <description>CPS Temporal Service</description> <properties> - <app>org.onap.cps.temporal.Application</app> <docker.repository.pull>nexus3.onap.org:10001/</docker.repository.pull> <docker.repository.push>nexus3.onap.org:10003/</docker.repository.push> <image.base>${docker.repository.pull}onap/integration-java11:8.0.0</image.base> @@ -45,7 +46,8 @@ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> <minimum-coverage>0.8</minimum-coverage> <!-- Application dependencies versions --> - <cps.version>1.0.1</cps.version> + <!--cps.version need to be changed to released Istanbul version--> + <cps.version>1.1.0-SNAPSHOT</cps.version> <mapstruct.version>1.4.2.Final</mapstruct.version> </properties> @@ -113,6 +115,11 @@ <artifactId>cps-events</artifactId> <version>1.1.0-SNAPSHOT</version> </dependency> + <dependency> + <groupId>org.springdoc</groupId> + <artifactId>springdoc-openapi-ui</artifactId> + <version>1.5.9</version> + </dependency> <!-- Runtime dependencies--> <dependency> <groupId>org.postgresql</groupId> @@ -178,6 +185,17 @@ </dependencies> <build> + <resources> + <resource> + <directory>docs/api</directory> + <targetPath>static</targetPath> + <filtering>true</filtering> + </resource> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -202,6 +220,14 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2.3.3.RELEASE</version> + <executions> + <execution> + <goals> + <goal>build-info</goal> + <goal>repackage</goal> + </goals> + </execution> + </executions> </plugin> <plugin> <!-- The gmavenplus plugin is used to compile Groovy code. To learn more about this plugin, @@ -329,6 +355,7 @@ to 'Low'. --> <effort>Max</effort> + <addSourceDirs>true</addSourceDirs> <!-- Reports all bugs (other values are medium and max) --> <threshold>Low</threshold> <!-- Build doesn't fail if problems are found --> @@ -390,6 +417,9 @@ <goal>check</goal> </goals> <configuration> + <excludes> + <exclude>org/onap/cps/temporal/controller/rest/model/*</exclude> + </excludes> <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile> <rules> <rule> @@ -416,6 +446,32 @@ </execution> </executions> </plugin> + <plugin> + <groupId>io.swagger.codegen.v3</groupId> + <artifactId>swagger-codegen-maven-plugin</artifactId> + <version>3.0.27</version> + <executions> + <execution> + <goals> + <goal>generate</goal> + </goals> + <configuration> + <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec> + <invokerPackage>org.onap.cps.temporal.controller.rest</invokerPackage> + <modelPackage>org.onap.cps.temporal.controller.rest.model</modelPackage> + <apiPackage>org.onap.cps.temporal.controller.rest</apiPackage> + <language>spring</language> + <generateSupportingFiles>false</generateSupportingFiles> + <configOptions> + <sourceFolder>src/gen/java</sourceFolder> + <dateLibrary>java11</dateLibrary> + <interfaceOnly>true</interfaceOnly> + <useTags>true</useTags> + </configOptions> + </configuration> + </execution> + </executions> + </plugin> </plugins> <pluginManagement> |