From: puthuparambil.aditya Date: Tue, 23 Nov 2021 14:53:43 +0000 (+0000) Subject: Generating openapi documentation from openapi.yaml X-Git-Tag: 1.1.0~20 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=1d90226c31817f562118c2f3d484e000d6c72cae;p=cps%2Fncmp-dmi-plugin.git Generating openapi documentation from openapi.yaml Issue-ID: CPS-755 Signed-off-by: puthuparambil.aditya Change-Id: Ib19afce259639d0154e6dbeb825c5da0e3dbfa3a --- diff --git a/pom.xml b/pom.xml index 552d30fa..cc74f4c8 100644 --- a/pom.xml +++ b/pom.xml @@ -92,6 +92,11 @@ + + org.springdoc + springdoc-openapi-ui + 1.5.9 + org.spockframework spock-core @@ -199,6 +204,29 @@ + + maven-resources-plugin + + + copy-resources + compile + + copy-resources + + + ${project.basedir}/target/classes/static/api-docs + + + ${project.basedir}/target/generated-sources/swagger/ + + openapi.yaml + + + + + + + org.springframework.boot spring-boot-maven-plugin diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 1a3b843f..67cd28ee 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -74,3 +74,11 @@ logging: console: "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" file: "%d %p %c{1.} [%t] %m%n" file: dmi.log + +springdoc: + swagger-ui: + disable-swagger-default-url: true + urlsPrimaryName: query + urls: + - name: query + url: /api-docs/openapi.yaml \ No newline at end of file