Add plugin to copy openapi files to doc folder 47/139647/1
authormpriyank <priyank.maheshwari@est.tech>
Wed, 4 Dec 2024 15:49:34 +0000 (15:49 +0000)
committermpriyank <priyank.maheshwari@est.tech>
Wed, 4 Dec 2024 15:49:40 +0000 (15:49 +0000)
- Added copy to doc folder plugin for ncmp-dmi-plugin
- Updated the info.version property to 1.7.0 which ensures that the
  plugin works

Issue-ID: CPS-2539
Change-Id: I1d456e2b16a6d66e6e71c21e5e16732408721837
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
dmi-service/openapi/openapi-datajob.yml
dmi-service/openapi/openapi.yml
dmi-service/pom.xml
docs/api/swagger/openapi-datajob.yaml
docs/api/swagger/openapi.yaml

index 569fa19..d125a1a 100644 (file)
@@ -20,7 +20,7 @@ openapi: 3.0.3
 info:
   title: NCMP Data Subjob API
   description: Support datajobs through one or more subjob for each DMI and Data Producer Identifier combination
-  version: 1.0.0
+  version: 1.7.0
 servers:
   - url: /dmi
 tags:
index f61d301..7bb381b 100644 (file)
@@ -21,7 +21,7 @@ openapi: 3.0.1
 info:
   title: NCMP DMI Plugin
   description: Adds Data Model Inventory Registry capability for ONAP
-  version: "1.0.0"
+  version: "1.7.0"
 servers:
   - url: /dmi
 tags:
index c6d4cfe..0686f3a 100644 (file)
@@ -48,6 +48,7 @@
         <openapi.generator.maven.plugin.version>6.6.0</openapi.generator.maven.plugin.version>
         <spring.boot.maven.plugin.version>3.1.2</spring.boot.maven.plugin.version>
         <spotbugs.maven.plugin.version>4.4.2</spotbugs.maven.plugin.version>
+        <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
 
         <!-- Code Coverage Configuration -->
         <jacoco.execFile>${basedir}/target/code-coverage/jacoco-ut.exec</jacoco.execFile>
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>${maven-resources-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <id>copy-to-doc-folder</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.basedir}/../docs/api/swagger</outputDirectory>
+                            <overwrite>true</overwrite>
+                            <resources>
+                                <resource>
+                                    <directory>${project.basedir}/target/generated-sources/openapi/openapi/</directory>
+                                    <includes>
+                                        <include>openapi.yaml</include>
+                                        <include>openapi-datajob.yaml</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
index e5a5502..d6cea5e 100644 (file)
@@ -3,7 +3,7 @@ info:
   description: Support datajobs through one or more subjob for each DMI and Data Producer
     Identifier combination
   title: NCMP Data Subjob API
-  version: 1.0.0
+  version: 1.7.0
 servers:
 - url: /dmi
 tags:
index df9c3f1..b8dedc6 100644 (file)
@@ -2,7 +2,7 @@ openapi: 3.0.1
 info:
   description: Adds Data Model Inventory Registry capability for ONAP
   title: NCMP DMI Plugin
-  version: 1.0.0
+  version: 1.7.0
 servers:
 - url: /dmi
 tags: