From 0a07999ae3b27154249de5744c4b20fbb627dcdb Mon Sep 17 00:00:00 2001 From: lapentafd Date: Tue, 7 Feb 2023 15:48:03 +0000 Subject: Removing Drools-pdp swagger annotations Added swagger extracted documentation in openapi.yaml for lifecycle, legacy, management and healthcheck. Added new endpoint to retrieve the generated swagger.json Modified endpoint in telemetry tool Issue-ID: POLICY-3465 Change-Id: I003aaf128b1a4991ffe6b79f0659d1bd0137b52d Signed-off-by: lapentafd --- .../policy/drools/server/restful/test/RestManagerTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'policy-management/src/test/java/org') diff --git a/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java b/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java index feeb25ed..b8561c5c 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java @@ -336,6 +336,17 @@ public class RestManagerTest { "[{f:v}]", ContentType.APPLICATION_JSON); } + @Test + public void testGetSwagger() throws IOException { + HttpGet httpGet; + CloseableHttpResponse response; + httpGet = new HttpGet(HOST_URL + "/engine/swagger"); + response = client.execute(httpGet); + logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode()); + assertEquals(200, response.getStatusLine().getStatusCode()); + httpGet.releaseConnection(); + } + @Test public void testGet() throws IOException { HttpGet httpGet; -- cgit 1.2.3-korg