summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cps-application/src/main/resources/application.yml5
-rwxr-xr-xcps-rest/pom.xml7
-rw-r--r--cps-rest/src/main/resources/static/components.yml (renamed from cps-rest/docs/openapi/components.yml)1
-rw-r--r--cps-rest/src/main/resources/static/cpsAdmin.yml (renamed from cps-rest/docs/openapi/cpsAdmin.yml)0
-rw-r--r--cps-rest/src/main/resources/static/cpsData.yml (renamed from cps-rest/docs/openapi/cpsData.yml)7
-rw-r--r--cps-rest/src/main/resources/static/cpsQuery.yml (renamed from cps-rest/docs/openapi/cpsQuery.yml)0
-rw-r--r--cps-rest/src/main/resources/static/openapi.yml (renamed from cps-rest/docs/openapi/openapi.yml)2
7 files changed, 19 insertions, 3 deletions
diff --git a/cps-application/src/main/resources/application.yml b/cps-application/src/main/resources/application.yml
index 1b62b02df5..ac620f6cb3 100644
--- a/cps-application/src/main/resources/application.yml
+++ b/cps-application/src/main/resources/application.yml
@@ -73,6 +73,11 @@ notification:
enabled: false
topic: ${CPS_CHANGE_EVENT_TOPIC:cps.cfg-state-events}
+springdoc:
+ swagger-ui:
+ url: /openapi.yml
+ path: /swagger-ui/index.html
+
security:
# comma-separated uri patterns which do not require authorization
permit-uri: /manage/**,/swagger-ui/**,/swagger-resources/**,/v3/api-docs
diff --git a/cps-rest/pom.xml b/cps-rest/pom.xml
index 4b42656e89..9a131176db 100755
--- a/cps-rest/pom.xml
+++ b/cps-rest/pom.xml
@@ -75,6 +75,11 @@
<artifactId>swagger-annotations</artifactId>
</dependency>
<dependency>
+ <groupId>org.springdoc</groupId>
+ <artifactId>springdoc-openapi-ui</artifactId>
+ <version>1.5.9</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
@@ -133,7 +138,7 @@
<goal>generate</goal>
</goals>
<configuration>
- <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
+ <inputSpec>${project.basedir}/src/main/resources/static/openapi.yml</inputSpec>
<invokerPackage>org.onap.cps.rest.controller</invokerPackage>
<modelPackage>org.onap.cps.rest.model</modelPackage>
<apiPackage>org.onap.cps.rest.api</apiPackage>
diff --git a/cps-rest/docs/openapi/components.yml b/cps-rest/src/main/resources/static/components.yml
index 6543fcab6d..51a49a6e9f 100644
--- a/cps-rest/docs/openapi/components.yml
+++ b/cps-rest/src/main/resources/static/components.yml
@@ -196,6 +196,7 @@ components:
application/json:
schema:
type: object
+ example: { "key": "value" }
Created:
description: Created
content:
diff --git a/cps-rest/docs/openapi/cpsAdmin.yml b/cps-rest/src/main/resources/static/cpsAdmin.yml
index 35b2e4ca6a..35b2e4ca6a 100644
--- a/cps-rest/docs/openapi/cpsAdmin.yml
+++ b/cps-rest/src/main/resources/static/cpsAdmin.yml
diff --git a/cps-rest/docs/openapi/cpsData.yml b/cps-rest/src/main/resources/static/cpsData.yml
index fb21f757a0..7e9f71d62b 100644
--- a/cps-rest/docs/openapi/cpsData.yml
+++ b/cps-rest/src/main/resources/static/cpsData.yml
@@ -28,7 +28,12 @@ nodeByDataspaceAndAnchor:
- $ref: 'components.yml#/components/parameters/includeDescendantsOptionInQuery'
responses:
'200':
- $ref: 'components.yml#/components/responses/Ok'
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ example: { "child": my_child,"leafList": "leafListElement1, leafListElement2", "leaf": my_leaf }
'400':
$ref: 'components.yml#/components/responses/BadRequest'
'401':
diff --git a/cps-rest/docs/openapi/cpsQuery.yml b/cps-rest/src/main/resources/static/cpsQuery.yml
index f45f3f41ae..f45f3f41ae 100644
--- a/cps-rest/docs/openapi/cpsQuery.yml
+++ b/cps-rest/src/main/resources/static/cpsQuery.yml
diff --git a/cps-rest/docs/openapi/openapi.yml b/cps-rest/src/main/resources/static/openapi.yml
index caaad68b60..8fa640cf9b 100644
--- a/cps-rest/docs/openapi/openapi.yml
+++ b/cps-rest/src/main/resources/static/openapi.yml
@@ -35,7 +35,7 @@ info:
url: "cps_logo.png"
servers:
- - url: //localhost:8088
+ - url: /cps/api
tags:
- name: cps-admin
description: cps Admin