diff options
author | lapentafd <francesco.lapenta@est.tech> | 2023-01-09 15:16:54 +0000 |
---|---|---|
committer | lapentafd <francesco.lapenta@est.tech> | 2023-01-17 09:15:20 +0000 |
commit | 09191f108632a46862ea7c60023ea5d012a81823 (patch) | |
tree | 80ce5cbf4fc64e69c13b6107712298472cc10b07 /main/src/test/java | |
parent | 7c48007486d0d1ee47a5eea81135e49737677155 (diff) |
Use generated PAP interface for Swagger
This commit removes the Swagger V2 annotations on the
Rest Controllers in policy-pap. The OpeApi annotations (Swagger
v3 annotations) are on a generated Java Interface. The code is changed
so that the controller implements that interface.
There are minimal code changes to the controller and the order of the
parameters is switched in some cases.
Issue-ID: POLICY-4404
Change-Id: I060709806a8e5bc04d9873c8d212a5c9fe13c4d4
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
Diffstat (limited to 'main/src/test/java')
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java b/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java index 04971cce..96e36df1 100644 --- a/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java +++ b/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java @@ -144,10 +144,10 @@ public abstract class CommonPapRestServer { * @throws Exception if an error occurs */ protected void testSwagger(final String endpoint) throws Exception { - final Invocation.Builder invocationBuilder = - sendFqeRequest(httpsPrefix + "v3/api-docs", true, MediaType.APPLICATION_JSON); + final Invocation.Builder invocationBuilder = sendFqeRequest(httpsPrefix + + ENDPOINT_PREFIX + "v3/api-docs", true, MediaType.APPLICATION_JSON); final String resp = invocationBuilder.get(String.class); - assertTrue(resp.contains(ENDPOINT_PREFIX + endpoint)); + assertTrue(resp.contains(endpoint)); } /** |