diff options
author | Dmitry Puzikov <d.puzikov2@partner.samsung.com> | 2020-03-03 10:18:41 +0100 |
---|---|---|
committer | Yuli Shlosberg <ys9693@att.com> | 2020-03-16 20:14:52 +0000 |
commit | cdca700bbc71af59acfe340b54d464f28206bb79 (patch) | |
tree | 6b5d42a082b098b8ce84f36b105301f4e17f5735 /catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadEndpoint.java | |
parent | 71b9e84b987f2b1bb8981ddc4270bf15d5d5675b (diff) |
Fix SDC-BE Swagger
General reorganisation of APIs rendering done.
Fixed mix of swagger.v2 and new swagger.v3
conflicting annotatons.
Moved to newer version of swagger-ui.
Removed unused/inconsistent parts of pom.xml.
Change-Id: Id1356b766caff6bf5817768c1a0f9b80541b85e8
Issue-ID: SDC-2718
Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com>
Diffstat (limited to 'catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadEndpoint.java')
-rw-r--r-- | catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadEndpoint.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadEndpoint.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadEndpoint.java index 98d64dfc47..b0b897daf3 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadEndpoint.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadEndpoint.java @@ -22,15 +22,16 @@ package org.openecomp.sdc.be.servlets; import com.google.common.annotations.VisibleForTesting; import com.jcabi.aspects.Loggable; -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 io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.servers.Server; +import io.swagger.v3.oas.annotations.servers.Servers; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.tags.Tags; import org.apache.commons.lang3.tuple.ImmutablePair; import org.glassfish.jersey.media.multipart.FormDataParam; import org.openecomp.sdc.be.components.impl.CommonImportManager; @@ -67,7 +68,8 @@ import java.util.Map; @Path("/v1/catalog/uploadType") @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) -@OpenAPIDefinition(info = @Info(title = "Catalog Types Upload")) +@Tags({@Tag(name = "SDC Internal APIs")}) +@Servers({@Server(url = "/sdc2/rest")}) @Controller public class TypesUploadEndpoint extends BeGenericServlet{ private static final Logger LOGGER = LoggerFactory.getLogger(TypesUploadEndpoint.class); @@ -87,9 +89,9 @@ public class TypesUploadEndpoint extends BeGenericServlet{ @POST @Path("/annotationtypes") @Operation(description = "Create AnnotationTypes from yaml", method = "POST", - summary = "Returns created annotation types",responses = @ApiResponse( - content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class))))) - @ApiResponses(value = {@ApiResponse(responseCode = "201", description = "annotation types created"), + summary = "Returns created annotation types", responses = { + @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class)))), + @ApiResponse(responseCode = "201", description = "annotation types created"), @ApiResponse(responseCode = "403", description = "Restricted operation"), @ApiResponse(responseCode = "400", description = "Invalid content / Missing content"), @ApiResponse(responseCode = "409", description = "annotation types already exist")}) |