summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services
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/conflict-rest/conflict-rest-services
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/conflict-rest/conflict-rest-services')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/main/java/org/openecomp/sdcrests/conflict/rest/Conflicts.java44
1 files changed, 24 insertions, 20 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/main/java/org/openecomp/sdcrests/conflict/rest/Conflicts.java b/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/main/java/org/openecomp/sdcrests/conflict/rest/Conflicts.java
index 9440cfd395..6e6fade369 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/main/java/org/openecomp/sdcrests/conflict/rest/Conflicts.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/main/java/org/openecomp/sdcrests/conflict/rest/Conflicts.java
@@ -20,9 +20,13 @@
package org.openecomp.sdcrests.conflict.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+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.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
import org.openecomp.sdcrests.common.RestConstants;
import org.openecomp.sdcrests.conflict.types.ConflictDto;
import org.openecomp.sdcrests.conflict.types.ConflictResolutionDto;
@@ -37,39 +41,39 @@ import javax.ws.rs.core.Response;
@Path("/v1.0/items/{itemId}/versions/{versionId}/conflicts")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Item Version Conflicts")
+@OpenAPIDefinition(info = @Info(title = "Item Version Conflicts"))
@Validated
public interface Conflicts {
@GET
@Path("/")
- @ApiOperation(value = "item version conflicts",
- notes = "Item version private copy conflicts against its public copy",
- response = ItemVersionConflictDto.class)
- Response getConflict(@ApiParam("Item Id") @PathParam("itemId") String itemId,
- @ApiParam("Version Id") @PathParam("versionId") String versionId,
+ @Operation(description = "item version conflicts",
+ summary = "Item version private copy conflicts against its public copy",
+ responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ItemVersionConflictDto.class))))
+ Response getConflict(@Parameter(description = "Item Id") @PathParam("itemId") String itemId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = RestConstants.USER_MISSING_ERROR_MSG)
@HeaderParam(RestConstants.USER_ID_HEADER_PARAM) String user);
@GET
@Path("/{conflictId}")
- @ApiOperation(value = "Gets item version conflict",
- notes = "Gets an item version private copy conflict against its public copy",
- response = ConflictDto.class)
- Response getConflict(@ApiParam("Item Id") @PathParam("itemId") String itemId,
- @ApiParam("Version Id") @PathParam("versionId") String versionId,
- @ApiParam("Version Id") @PathParam("conflictId") String conflictId,
+ @Operation(description = "Gets item version conflict",
+ summary = "Gets an item version private copy conflict against its public copy",
+ responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ConflictDto.class))))
+ Response getConflict(@Parameter(description = "Item Id") @PathParam("itemId") String itemId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Version Id") @PathParam("conflictId") String conflictId,
@NotNull(message = RestConstants.USER_MISSING_ERROR_MSG)
@HeaderParam(RestConstants.USER_ID_HEADER_PARAM) String user);
@PUT
@Path("/{conflictId}")
- @ApiOperation(value = "Resolves item version conflict",
- notes = "Resolves an item version private copy conflict against its public copy")
+ @Operation(description = "Resolves item version conflict",
+ summary = "Resolves an item version private copy conflict against its public copy")
Response resolveConflict(ConflictResolutionDto conflictResolution,
- @ApiParam("Item Id") @PathParam("itemId") String itemId,
- @ApiParam("Version Id") @PathParam("versionId") String versionId,
- @ApiParam("Version Id") @PathParam("conflictId") String conflictId,
+ @Parameter(description = "Item Id") @PathParam("itemId") String itemId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Version Id") @PathParam("conflictId") String conflictId,
@NotNull(message = RestConstants.USER_MISSING_ERROR_MSG)
@HeaderParam(RestConstants.USER_ID_HEADER_PARAM) String user);
}