From fb09b7c27a814619d8032ac96a0fc6f757127358 Mon Sep 17 00:00:00 2001 From: egernug Date: Thu, 12 Oct 2023 13:33:08 +0100 Subject: [PATCH] [BUG] Fix for Swagger UI generation Issue-ID: CPS-1913 Signed-off-by: egernug Change-Id: Ib8a1b5fddc9957bd371fbb4dc54d018b25af3679 --- cps-application/pom.xml | 4 ++++ cps-dependencies/pom.xml | 5 ++++ cps-ncmp-rest/pom.xml | 3 +-- cps-rest/docs/openapi/components.yml | 3 +-- docs/api/swagger/cps/openapi.yaml | 3 --- docs/api/swagger/ncmp/openapi-inventory.yaml | 34 ++++++++++++++++++++++++++++ 6 files changed, 45 insertions(+), 7 deletions(-) diff --git a/cps-application/pom.xml b/cps-application/pom.xml index f4e3e916f..7b0f1f602 100755 --- a/cps-application/pom.xml +++ b/cps-application/pom.xml @@ -65,6 +65,10 @@ org.springframework.boot spring-boot-starter-actuator + + org.springdoc + springdoc-openapi-starter-webmvc-ui + org.eclipse.jetty jetty-server diff --git a/cps-dependencies/pom.xml b/cps-dependencies/pom.xml index cff596f05..a59dbe410 100755 --- a/cps-dependencies/pom.xml +++ b/cps-dependencies/pom.xml @@ -72,6 +72,11 @@ + + org.springdoc + springdoc-openapi-starter-webmvc-ui + 2.0.2 + org.springdoc springdoc-openapi-ui diff --git a/cps-ncmp-rest/pom.xml b/cps-ncmp-rest/pom.xml index 6a52d9f1a..d401d9020 100644 --- a/cps-ncmp-rest/pom.xml +++ b/cps-ncmp-rest/pom.xml @@ -192,10 +192,9 @@ compile ${project.basedir}/docs/openapi/openapi-inventory.yml - spring + openapi-yaml openapi-inventory.yaml - true diff --git a/cps-rest/docs/openapi/components.yml b/cps-rest/docs/openapi/components.yml index 900f663bf..a3016ce76 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 453494ec4..30ca1fdc3 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 af6b004b1..ebe310160 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: -- 2.16.6