Update pom.xml to add spring doc 57/132557/1
authorliamfallon <liam.fallon@est.tech>
Thu, 1 Dec 2022 17:55:58 +0000 (17:55 +0000)
committerliamfallon <liam.fallon@est.tech>
Thu, 1 Dec 2022 17:56:08 +0000 (17:56 +0000)
Springfox will be replaced with Spring Doc for rendering the
documentation from controllers using OpenAPI 3.0 (Swagger 3.0).

This commit adds Spring Doc to dependency management. SpringFox will be
removed once all the components are converted to SpringDoc.

Issue-ID: POLICY-4404
Change-Id: I861344865ce4f9aae4572690876ef7d9d7844916
Signed-off-by: liamfallon <liam.fallon@est.tech>
integration/pom.xml
integration/src/main/scripts/release/releasePhase.sh

index 806e01a..4d53081 100644 (file)
@@ -21,8 +21,7 @@
   ============LICENSE_END=========================================================
 -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.onap.policy.parent</groupId>
@@ -47,6 +46,8 @@
         <version.jackson>2.14.0-rc1</version.jackson>
         <version.ccsdk>1.4.0</version.ccsdk>
         <version.swagger>1.6.6</version.swagger>
+        <version.swagger.core.v3>2.2.7</version.swagger.core.v3>
+        <version.swagger.codegen.v3>3.0.36</version.swagger.codegen.v3>
         <version.javax.bind>2.3.1</version.javax.bind>
         <version.javax.json>1.1.4</version.javax.json>
         <version.netty>4.1.84.Final</version.netty>
@@ -58,6 +59,7 @@
         <version.mockserver>5.13.2</version.mockserver>
         <version.immutable>2.8.8</version.immutable>
         <version.springfox>3.0.0</version.springfox>
+        <version.springdoc>1.6.13</version.springdoc>
         <version.jakarta-api>2.0.2</version.jakarta-api>
         <version.io.micrometer>1.7.3</version.io.micrometer>
         <version.io.prometheus>0.11.0</version.io.prometheus>
                 <artifactId>swagger-models</artifactId>
                 <version>${version.swagger}</version>
             </dependency>
+            <dependency>
+                <groupId>io.swagger.core.v3</groupId>
+                <artifactId>swagger-models</artifactId>
+                <version>${version.swagger.core.v3}</version>
+            </dependency>
 
             <!-- Encoder and decoders for various formats -->
             <dependency>
                 <artifactId>json</artifactId>
                 <version>20201115</version>
             </dependency>
-           <dependency>
-               <groupId>com.worldturner.medeia</groupId>
-               <artifactId>medeia-validator-gson</artifactId>
-               <version>1.1.1</version>
-           </dependency>
+            <dependency>
+                <groupId>com.worldturner.medeia</groupId>
+                <artifactId>medeia-validator-gson</artifactId>
+                <version>1.1.1</version>
+            </dependency>
 
             <!-- Lombok -->
             <dependency>
                 <scope>runtime</scope>
             </dependency>
 
+            <!-- Springdoc -->
+            <dependency>
+                <groupId>org.springdoc</groupId>
+                <artifactId>springdoc-openapi-ui</artifactId>
+                <version>${version.springdoc}</version>
+            </dependency>
+
             <!-- File upload -->
             <dependency>
                 <groupId>commons-fileupload</groupId>
                                                 <ignore />
                                             </action>
                                         </pluginExecution>
+                                        <pluginExecution>
+                                            <pluginExecutionFilter>
+                                                <groupId>io.swagger.codegen.v3</groupId>
+                                                <artifactId>swagger-codegen-maven-plugin</artifactId>
+                                                <versionRange>[3.0.0,)</versionRange>
+                                                <goals>
+                                                    <goal>generate</goal>
+                                                </goals>
+                                            </pluginExecutionFilter>
+                                            <action>
+                                                <ignore />
+                                            </action>
+                                        </pluginExecution>
                                     </pluginExecutions>
                                 </lifecycleMappingMetadata>
                             </configuration>
                             <includeResources>true</includeResources>
                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
                             <includeTestResources>true</includeTestResources>
-                            <excludes>
-                            </excludes>
+                            <excludes></excludes>
                             <consoleOutput>true</consoleOutput>
                             <failOnViolation>true</failOnViolation>
                             <violationSeverity>warning</violationSeverity>
index f29bbd3..800768e 100755 (executable)
@@ -387,7 +387,6 @@ release_phase_14() {
     echo "Updated snapshots on policy/drools-applications and policy/gui"
 }
 
-
 release_phase_15() {
     echo "Updating release data file . . ."
     updateRefs.sh \