aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseAgreements.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseAgreements.java')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseAgreements.java46
1 files changed, 24 insertions, 22 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseAgreements.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseAgreements.java
index 898071c642..506058d2af 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseAgreements.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseAgreements.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vendorlicense.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.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.vendorlicense.types.LicenseAgreementEntityDto;
import org.openecomp.sdcrests.vendorlicense.types.LicenseAgreementModelDto;
import org.openecomp.sdcrests.vendorlicense.types.LicenseAgreementRequestDto;
@@ -42,39 +47,37 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/vendor-license-models/{vlmId}/versions/{versionId}/license-agreements")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor License Model - License Agreements")
+@OpenAPIDefinition(info = @Info(title = "Vendor License Model - License Agreements"))
@Validated
public interface LicenseAgreements {
@GET
@Path("/")
- @ApiOperation(value = "List vendor license agreements",
- response = LicenseAgreementEntityDto.class,
- responseContainer = "List")
+ @Operation(description = "List vendor license agreements", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation =LicenseAgreementEntityDto.class)))))
Response listLicenseAgreements(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@POST
@Path("/")
- @ApiOperation(value = "Create vendor license agreement")
+ @Operation(description = "Create vendor license agreement")
Response createLicenseAgreement(@Valid LicenseAgreementRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
- @ApiParam(value = "Vendor license model version Id")
+ @Parameter(description = "Vendor license model version Id")
@PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@PUT
@Path("/{licenseAgreementId}")
- @ApiOperation(value = "Update vendor license agreement")
+ @Operation(description = "Update vendor license agreement")
Response updateLicenseAgreement(@Valid LicenseAgreementUpdateRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
- @ApiParam(value = "Vendor license model version Id")
+ @Parameter(description = "Vendor license model version Id")
@PathParam("versionId") String versionId,
@PathParam("licenseAgreementId") String licenseAgreementId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@@ -82,20 +85,19 @@ public interface LicenseAgreements {
@GET
@Path("/{licenseAgreementId}")
- @ApiOperation(value = "Get vendor license agreement",
- response = LicenseAgreementModelDto.class)
+ @Operation(description = "Get vendor license agreement", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = LicenseAgreementModelDto.class))))
Response getLicenseAgreement(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@PathParam("licenseAgreementId") String licenseAgreementId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@DELETE
@Path("/{licenseAgreementId}")
- @ApiOperation(value = "Delete vendor license agreement")
+ @Operation(description = "Delete vendor license agreement")
Response deleteLicenseAgreement(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@PathParam("licenseAgreementId") String licenseAgreementId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);