aboutsummaryrefslogtreecommitdiffstats
path: root/a1-policy-management/src
diff options
context:
space:
mode:
authorPatrikBuhr <patrik.buhr@est.tech>2021-01-20 12:21:52 +0100
committerPatrikBuhr <patrik.buhr@est.tech>2021-01-21 10:44:37 +0100
commit1122b01a05d4de22564716b815935bf880703276 (patch)
tree4d72bd20a2b1058b02b8b61b6c9aae04db8f759b /a1-policy-management/src
parentbe0ae3e197f5d5032c0766a59050b03e2a4deb99 (diff)
PMS API Documentation updates
Change-Id: I2a02145c48fd4b022b2e17b157760bd7ddb8128f Issue-ID: CCSDK-3077 Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Diffstat (limited to 'a1-policy-management/src')
-rw-r--r--a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v1/Consts.java2
-rw-r--r--a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/Consts.java2
-rw-r--r--a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java10
3 files changed, 9 insertions, 5 deletions
diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v1/Consts.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v1/Consts.java
index c54394e0..69868d2d 100644
--- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v1/Consts.java
+++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v1/Consts.java
@@ -22,7 +22,7 @@ package org.onap.ccsdk.oran.a1policymanagementservice.controllers.v1;
public class Consts {
- public static final String V1_API_NAME = "A1 Policy Management Version 1.0";
+ public static final String V1_API_NAME = "A1 Policy Management Version 1.0 (deprecated)";
private Consts() {}
}
diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/Consts.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/Consts.java
index d791ff26..d365ad9a 100644
--- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/Consts.java
+++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/Consts.java
@@ -29,7 +29,7 @@ public class Consts {
public static final String MANAGED_ELEMENT_ID_PARAM = "managed_element_id";
public static final String V2_API_ROOT = "a1-policy/v2";
- public static final String V2_API_NAME = "A1 Policy Management Version 2.0 (in progress)";
+ public static final String V2_API_NAME = "A1 Policy Management Version 2.0";
public static final String V2_CONFIG_API_NAME = "Component Configuration";
private Consts() {}
diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java
index 5edee150..14843eb2 100644
--- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java
+++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java
@@ -98,7 +98,7 @@ import reactor.util.annotation.Nullable;
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@TestPropertySource(properties = { //
"server.ssl.key-store=./config/keystore.jks", //
- "app.webclient.trust-store=./config/truststore.jks"})
+ "app.webclient.trust-store=./config/truststore.jks" })
class ApplicationTest {
private static final Logger logger = LoggerFactory.getLogger(ApplicationTest.class);
@@ -219,6 +219,10 @@ class ApplicationTest {
assertThat(resp.getStatusCode()).isEqualTo(HttpStatus.OK);
JSONObject jsonObj = new JSONObject(resp.getBody());
jsonObj.remove("host");
+ assertThat(jsonObj.getJSONObject("definitions").remove("Mono«ResponseEntity«object»»")).isNotNull();
+ assertThat(jsonObj.getJSONObject("definitions").remove("void")).isNotNull();
+ assertThat(jsonObj.getJSONObject("definitions").remove("Mono«ResponseEntity«string»»")).isNotNull();
+
String indented = (jsonObj).toString(4);
String docDir = "api/";
Files.createDirectories(Paths.get(docDir));
@@ -769,8 +773,8 @@ class ApplicationTest {
for (int i = 0; i < 10; ++i) {
AsyncRestClient restClient = restClient();
- ConcurrencyTestRunnable test =
- new ConcurrencyTestRunnable(restClient, supervision, a1ClientFactory, rics, policyTypes);
+ ConcurrencyTestRunnable test = new ConcurrencyTestRunnable(restClient, supervision, a1ClientFactory, rics,
+ policyTypes);
Thread thread = new Thread(test, "TestThread_" + i);
thread.start();
threads.add(thread);