summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoregernug <gerard.nugent@est.tech>2023-10-12 13:33:08 +0100
committeregernug <gerard.nugent@est.tech>2023-10-17 12:12:36 +0100
commitfb09b7c27a814619d8032ac96a0fc6f757127358 (patch)
treee6333b85d16bb3ca639b7cbf8f07e25e9bfa6fd1
parentfc7a5d30953cfedd7e2ea2f969adab03716de6df (diff)
[BUG] Fix for Swagger UI generation
Issue-ID: CPS-1913 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: Ib8a1b5fddc9957bd371fbb4dc54d018b25af3679
-rwxr-xr-xcps-application/pom.xml4
-rwxr-xr-xcps-dependencies/pom.xml5
-rw-r--r--cps-ncmp-rest/pom.xml3
-rw-r--r--cps-rest/docs/openapi/components.yml3
-rw-r--r--docs/api/swagger/cps/openapi.yaml3
-rw-r--r--docs/api/swagger/ncmp/openapi-inventory.yaml34
6 files changed, 45 insertions, 7 deletions
diff --git a/cps-application/pom.xml b/cps-application/pom.xml
index f4e3e916f9..7b0f1f6027 100755
--- a/cps-application/pom.xml
+++ b/cps-application/pom.xml
@@ -66,6 +66,10 @@
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
+ <groupId>org.springdoc</groupId>
+ <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</dependency>
diff --git a/cps-dependencies/pom.xml b/cps-dependencies/pom.xml
index cff596f05e..a59dbe410c 100755
--- a/cps-dependencies/pom.xml
+++ b/cps-dependencies/pom.xml
@@ -74,6 +74,11 @@
<!-- S P R I N G D E P E N D E N C I E S -->
<dependency>
<groupId>org.springdoc</groupId>
+ <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
+ <version>2.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.6.6</version>
</dependency>
diff --git a/cps-ncmp-rest/pom.xml b/cps-ncmp-rest/pom.xml
index 6a52d9f1af..d401d9020d 100644
--- a/cps-ncmp-rest/pom.xml
+++ b/cps-ncmp-rest/pom.xml
@@ -192,10 +192,9 @@
<phase>compile</phase>
<configuration>
<inputSpec>${project.basedir}/docs/openapi/openapi-inventory.yml</inputSpec>
- <generatorName>spring</generatorName>
+ <generatorName>openapi-yaml</generatorName>
<configOptions>
<outputFile>openapi-inventory.yaml</outputFile>
- <useSpringBoot3>true</useSpringBoot3>
</configOptions>
</configuration>
</execution>
diff --git a/cps-rest/docs/openapi/components.yml b/cps-rest/docs/openapi/components.yml
index 900f663bfc..a3016ce762 100644
--- a/cps-rest/docs/openapi/components.yml
+++ b/cps-rest/docs/openapi/components.yml
@@ -1,6 +1,6 @@
# ============LICENSE_START=======================================================
# Copyright (c) 2021-2022 Bell Canada.
-# Modifications Copyright (C) 2021-2022 Nordix Foundation
+# Modifications Copyright (C) 2021-2023 Nordix Foundation
# Modifications Copyright (C) 2022-2023 TechMahindra Ltd.
# Modifications Copyright (C) 2022 Deutsche Telekom AG
# ================================================================================
@@ -64,7 +64,6 @@ components:
type: string
description: multipartFile
format: binary
- example: 'https://github.com/onap/cps/blob/master/cps-service/src/test/resources/bookstore.yang'
ModuleReferences:
type: object
diff --git a/docs/api/swagger/cps/openapi.yaml b/docs/api/swagger/cps/openapi.yaml
index 453494ec49..30ca1fdc35 100644
--- a/docs/api/swagger/cps/openapi.yaml
+++ b/docs/api/swagger/cps/openapi.yaml
@@ -2732,9 +2732,6 @@ components:
properties:
file:
description: multipartFile
- example: !!binary |-
- aHR0cHM6Ly9naXRodWIuY29tL29uYXAvY3BzL2Jsb2IvbWFzdGVyL2Nwcy1zZXJ2aWNlL3NyYy90
- ZXN0L3Jlc291cmNlcy9ib29rc3RvcmUueWFuZw==
format: binary
type: string
required:
diff --git a/docs/api/swagger/ncmp/openapi-inventory.yaml b/docs/api/swagger/ncmp/openapi-inventory.yaml
index af6b004b1b..ebe3101609 100644
--- a/docs/api/swagger/ncmp/openapi-inventory.yaml
+++ b/docs/api/swagger/ncmp/openapi-inventory.yaml
@@ -287,6 +287,12 @@ components:
moduleSetTag: my-module-set-tag
dmiPlugin: my-dmi-plugin
dmiModelPlugin: my-dmi-model-plugin
+ upgradedCmHandles:
+ cmHandles:
+ - my-cm-handle1
+ - my-cm-handle2
+ - my-cm-handle3
+ moduleSetTag: my-module-set-tag
dmiDataPlugin: my-dmi-data-plugin
removedCmHandles:
- my-cm-handle1
@@ -321,6 +327,8 @@ components:
items:
type: string
type: array
+ upgradedCmHandles:
+ $ref: '#/components/schemas/UpgradedCmHandles'
type: object
RestInputCmHandle:
example:
@@ -355,6 +363,28 @@ components:
example: my-property
type: string
type: object
+ UpgradedCmHandles:
+ example:
+ cmHandles:
+ - my-cm-handle1
+ - my-cm-handle2
+ - my-cm-handle3
+ moduleSetTag: my-module-set-tag
+ properties:
+ cmHandles:
+ example:
+ - my-cm-handle1
+ - my-cm-handle2
+ - my-cm-handle3
+ items:
+ type: string
+ type: array
+ moduleSetTag:
+ example: my-module-set-tag
+ type: string
+ required:
+ - cmHandles
+ type: object
ErrorMessage:
properties:
status:
@@ -379,6 +409,10 @@ components:
items:
$ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
type: array
+ failedUpgradeCmHandles:
+ items:
+ $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
+ type: array
type: object
CmHandlerRegistrationErrorResponse:
properties: