From f8d36209b972fddd500ef958b1df453376ff8703 Mon Sep 17 00:00:00 2001 From: Prudence Au Date: Wed, 4 Sep 2019 14:12:09 -0400 Subject: Use v2 of io.swagger to avoid the use of jQuery Issue-ID: LOG-1101 Signed-off-by: Prudence Au Change-Id: I91535ecf43869aa8d1ce5a86278c0b61fda7040b --- pom.xml | 6 ++++++ .../contextbuilder/sdc/service/rs/RestService.java | 24 +++++++++------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index 5131678..b2676d5 100644 --- a/pom.xml +++ b/pom.xml @@ -228,6 +228,12 @@ org.onap.logging-analytics.pomba pomba-audit-common 1.5.1-SNAPSHOT + + + io.swagger + swagger-annotations + + diff --git a/src/main/java/org/onap/pomba/contextbuilder/sdc/service/rs/RestService.java b/src/main/java/org/onap/pomba/contextbuilder/sdc/service/rs/RestService.java index 91a3569..6b2b8e3 100644 --- a/src/main/java/org/onap/pomba/contextbuilder/sdc/service/rs/RestService.java +++ b/src/main/java/org/onap/pomba/contextbuilder/sdc/service/rs/RestService.java @@ -17,10 +17,8 @@ */ package org.onap.pomba.contextbuilder.sdc.service.rs; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponse; -import io.swagger.annotations.ApiResponses; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import javax.ws.rs.GET; import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; @@ -31,7 +29,6 @@ import javax.ws.rs.core.Response; import org.onap.pomba.contextbuilder.sdc.exception.ToscaCsarException; -@Api @Path("{version: v2}/service") @Produces({MediaType.APPLICATION_JSON}) public interface RestService { @@ -40,15 +37,14 @@ public interface RestService { @GET @Path("/context") @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation( - value = "Retrieve SDC CSAR file for a give UUID", - notes = "This method returns SDC CSAR encoded value. ", - response = Response.class) - @ApiResponses(value = { - @ApiResponse(code = 404, message = "Service not available"), - @ApiResponse(code = 400, message = "Bad request"), - @ApiResponse(code = 401, message = "Unauthorized"), - @ApiResponse(code = 500, message = "Unexpected Runtime error") }) + @Operation( + summary = "Retrieve SDC CSAR file for a give UUID", + description = "This method returns SDC CSAR encoded value. ", + responses = { + @ApiResponse(responseCode = "404", description = "Service not available"), + @ApiResponse(responseCode = "400", description = "Bad request"), + @ApiResponse(responseCode = "401", description = "Unauthorized"), + @ApiResponse(responseCode = "500", description = "Unexpected Runtime error") }) public Response getContext( @HeaderParam("Authorization") String authorization, @HeaderParam("X-FromAppId") String xFromAppId, -- cgit 1.2.3-korg