summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VnfPackageRepository.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VnfPackageRepository.java')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VnfPackageRepository.java33
1 files changed, 19 insertions, 14 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VnfPackageRepository.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VnfPackageRepository.java
index 8723bf2237..8c0e004732 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VnfPackageRepository.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VnfPackageRepository.java
@@ -19,9 +19,6 @@ package org.openecomp.sdcrests.vsp.rest;
import static org.openecomp.sdcrests.common.RestConstants.USER_ID_HEADER_PARAM;
import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
import java.io.File;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -33,43 +30,51 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+
+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.vendorsoftwareproducts.types.UploadFileResponseDto;
import org.springframework.validation.annotation.Validated;
@Path("/v1.0/vendor-software-products/{vspId}/versions/{versionId}/vnfrepository")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "VNF Repository packages")
+@OpenAPIDefinition(info = @Info(title = "VNF Repository packages"))
@Validated
public interface VnfPackageRepository extends VspEntities {
@GET
@Path("/vnfpackages")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
- @ApiOperation(value = "Get VNF packages from VNF Repository",
- notes = "Call VNF Repository to get VNF package details", response = File.class)
+ @Operation(description = "Get VNF packages from VNF Repository",
+ summary = "Call VNF Repository to get VNF package details", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = File.class))))
Response getVnfPackages(@PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description= "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user) throws Exception;
@GET
@Path("/vnfpackage/{csarId}/download")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
- @ApiOperation(value = "Download VNF package from VNF Repository",
- notes = "Download VNF package from VNF repository and send to client", response = File.class)
+ @Operation(description = "Download VNF package from VNF Repository",
+ summary = "Download VNF package from VNF repository and send to client", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = File.class))))
Response downloadVnfPackage(@PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@PathParam("csarId") String csarId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user) throws Exception;
@POST
@Path("/vnfpackage/{csarId}/import")
@Produces(MediaType.APPLICATION_JSON)
- @ApiOperation(value = "Import VNF package from VNF Repository",
- notes = "Call VNF Repository to download VNF package, validate it and send the response",
- response = UploadFileResponseDto.class)
+ @Operation(description = "Import VNF package from VNF Repository",
+ summary = "Call VNF Repository to download VNF package, validate it and send the response",
+ responses = @ApiResponse(content = @Content(schema = @Schema(implementation = UploadFileResponseDto.class))))
Response importVnfPackage(@PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@PathParam("csarId") String csarId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user) throws Exception;
id='n287' href='#n287'>287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472