summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest
diff options
context:
space:
mode:
authorWojciech Sliwka <wojciech.sliwka@nokia.com>2019-07-03 08:38:28 +0200
committerTomasz Golabek <tomasz.golabek@nokia.com>2019-07-23 11:33:02 +0000
commit38b3b95830568296bde457cd33f79277765f5704 (patch)
tree0dea07cbf7469f3c1f4b93d04510312ec86226e6 /openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest
parenta73cbca41fbba96855173f39c89c04d50d4d8672 (diff)
Migrate swagger to openapi v3
Issue-ID: SDC-2261 Change-Id: I614c15878b9d165a4468570e8318867632c88434 Signed-off-by: Wojciech Sliwka <wojciech.sliwka@nokia.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java22
1 files changed, 12 insertions, 10 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java b/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java
index 2ce159a6fd..fb71761009 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java
@@ -16,8 +16,13 @@
package org.openecomp.sdcrests.togglz.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.info.Info;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
import org.openecomp.sdcrests.togglz.types.FeatureDto;
import org.openecomp.sdcrests.togglz.types.FeatureSetDto;
import org.springframework.validation.annotation.Validated;
@@ -30,31 +35,28 @@ import javax.ws.rs.core.Response;
@Path("/v1.0/togglz")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Togglz")
+@OpenAPIDefinition(info = @Info(title = "Togglz"))
@Validated
public interface TogglzFeatures {
@GET
- @ApiOperation(value = "Get TOGGLZ Features",
- response = FeatureSetDto.class,
- responseContainer = "List")
+ @Operation(description = "Get TOGGLZ Features", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation = FeatureSetDto.class)))))
Response getFeatures();
@PUT
@Path("/state/{state}")
- @ApiOperation(value = "Update feature toggle state for all features")
+ @Operation(description = "Update feature toggle state for all features")
Response setAllFeatures(@PathParam("state") boolean state);
@PUT
@Path("/{featureName}/state/{state}")
- @ApiOperation(value = "Update feature toggle state")
+ @Operation(description = "Update feature toggle state")
Response setFeatureState(@PathParam("featureName") String featureName, @PathParam("state") boolean state);
@GET
@Path("/{featureName}/state")
- @ApiOperation(value = "Get feature toggle state",
- response = FeatureDto.class)
+ @Operation(description = "Get feature toggle state", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = FeatureDto.class))))
Response getFeatureState(@PathParam("featureName") String featureName);
}