summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/unique-type-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/unique-type-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/unique-type-rest')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/unique-type-rest/unique-type-rest-services/src/main/java/org/openecomp/sdcrests/uniquevalue/rest/UniqueTypes.java22
1 files changed, 13 insertions, 9 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/unique-type-rest/unique-type-rest-services/src/main/java/org/openecomp/sdcrests/uniquevalue/rest/UniqueTypes.java b/openecomp-be/api/openecomp-sdc-rest-webapp/unique-type-rest/unique-type-rest-services/src/main/java/org/openecomp/sdcrests/uniquevalue/rest/UniqueTypes.java
index 73c7c7729d..fac7e7698a 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/unique-type-rest/unique-type-rest-services/src/main/java/org/openecomp/sdcrests/uniquevalue/rest/UniqueTypes.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/unique-type-rest/unique-type-rest-services/src/main/java/org/openecomp/sdcrests/uniquevalue/rest/UniqueTypes.java
@@ -15,7 +15,12 @@
*/
package org.openecomp.sdcrests.uniquevalue.rest;
-import io.swagger.annotations.*;
+
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.info.Info;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotNull;
@@ -29,24 +34,23 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/unique-types")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Unique Types")
+@OpenAPIDefinition(info = @Info(title = "Unique Types"))
@Validated
public interface UniqueTypes {
@GET
@Path("/")
- @ApiOperation(value = "Lists unique value types")
+ @Operation(description = "Lists unique value types")
Response listUniqueTypes(@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@GET
@Path("/{type}/values/{value}")
- @ApiOperation(value = "Gets unique value")
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "Indication whether the unique value is occupied"),
- @ApiResponse(code = 404, message = "Unsupported unique type")})
+ @Operation(description = "Gets unique value")
+ @ApiResponse(responseCode = "200", description = "Indication whether the unique value is occupied")
+ @ApiResponse(responseCode = "404", description = "Unsupported unique type")
Response getUniqueValue(
- @ApiParam("The unique value type, for example: 'VlmName'") @PathParam("type") String type,
- @ApiParam("The unique value") @PathParam("value") String value,
+ @Parameter(description = "The unique value type, for example: 'VlmName'") @PathParam("type") String type,
+ @Parameter(description = "The unique value") @PathParam("value") String value,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
}