diff options
author | lapentafd <francesco.lapenta@est.tech> | 2023-02-13 13:59:45 +0000 |
---|---|---|
committer | Francesco Davide Lapenta <francesco.lapenta@est.tech> | 2023-02-13 14:04:58 +0000 |
commit | 44dd8296a49937e347f6c2304bcaa09e3a67e3cc (patch) | |
tree | c8009f1a989ee9bb01c1b0a73f103474ed27c316 /controlloop/common/feature-controlloop-management/src/main/java | |
parent | 70ddcbe8e34eda99a7e6e9f383cc78a0d6f0cbd2 (diff) |
Clean Annotations drools-applications
Added swagger extracted documentation in openapi.yaml
Issue-ID: POLICY-3465
Change-Id: Icb30dea789559b0de379ce0e5d8da3e8d9a5dac5
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
Diffstat (limited to 'controlloop/common/feature-controlloop-management/src/main/java')
-rw-r--r-- | controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java b/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java index 0a721e8f5..d6ee19017 100644 --- a/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java +++ b/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java @@ -20,11 +20,6 @@ package org.onap.policy.drools.server.restful; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import io.swagger.annotations.ApiResponse; -import io.swagger.annotations.ApiResponses; import java.util.List; import java.util.UUID; import java.util.stream.Collectors; @@ -51,8 +46,7 @@ import org.slf4j.LoggerFactory; @Path("/policy/pdp") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) -@Api -public class RestControlLoopManager { +public class RestControlLoopManager implements PolicyApi { private static final Logger logger = LoggerFactory.getLogger(RestControlLoopManager.class); /** @@ -64,11 +58,9 @@ public class RestControlLoopManager { */ @GET @Path("engine/controllers/{controller}/drools/facts/{session}/controlloops") - @ApiOperation(value = "Control Loops", notes = "Compact list", responseContainer = "List") - @ApiResponses(value = {@ApiResponse(code = 404, message = "Control Loops cannot be found")}) public Response controlLoops( - @ApiParam(value = "Policy Controller Name", required = true) @PathParam("controller") String controllerName, - @ApiParam(value = "Drools Session Name", required = true) @PathParam("session") String sessionName) { + @PathParam("controller") String controllerName, + @PathParam("session") String sessionName) { try { List<String> controlLoopNames = @@ -93,12 +85,10 @@ public class RestControlLoopManager { */ @GET @Path("engine/controllers/{controller}/drools/facts/{session}/controlloops/{controlLoopName}") - @ApiOperation(value = "Control Loop", notes = "Control Loop Parameters", responseContainer = "List") - @ApiResponses(value = {@ApiResponse(code = 404, message = "The Control Loop cannot be found")}) public Response controlLoop( - @ApiParam(value = "Policy Controller Name", required = true) @PathParam("controller") String controllerName, - @ApiParam(value = "Drools Session Name", required = true) @PathParam("session") String sessionName, - @ApiParam(value = "Control Loop Name", required = true) @PathParam("controlLoopName") String controlLoopName) { + @PathParam("controller") String controllerName, + @PathParam("session") String sessionName, + @PathParam("controlLoopName") String controlLoopName) { try { List<ControlLoopParams> controlLoopParams = @@ -121,8 +111,7 @@ public class RestControlLoopManager { */ @GET @Path("engine/tools/controlloops/aai/customQuery/{vserverId}") - @ApiOperation(value = "AAI Custom Query") - public Response aaiCustomQuery(@ApiParam(value = "vserver Identifier") String vserverId) { + public Response aaiCustomQuery(String vserverId) { var mgr = PolicyEngineConstants.getManager(); return Response |