summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src
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/application-config-rest/application-config-rest-services/src
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/application-config-rest/application-config-rest-services/src')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java24
1 files changed, 15 insertions, 9 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java
index 4da561eac4..c7f16bf18e 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java
@@ -20,43 +20,49 @@
package org.openecomp.sdcrests.applicationconfig.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+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.apache.cxf.jaxrs.ext.multipart.Multipart;
+import org.openecomp.sdcrests.applicationconfiguration.types.ApplicationConfigDto;
import org.openecomp.sdcrests.applicationconfiguration.types.ConfigurationDataDto;
+import org.openecomp.sdcrests.wrappers.GenericCollectionWrapper;
import org.springframework.validation.annotation.Validated;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.io.InputStream;
+import java.util.List;
@Path("/v1.0/application-configuration")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Application Configuration")
+@OpenAPIDefinition(info = @Info(title = "Application Configuration"))
@Validated
public interface ApplicationConfiguration {
@POST
@Path("/")
@Consumes(MediaType.MULTIPART_FORM_DATA)
- @ApiOperation(value = "Insert JSON schema into application config table")
+ @Operation(description = "Insert JSON schema into application config table")
Response insertToTable(@QueryParam("namespace") String namespace, @QueryParam("key") String key,
- @Multipart("value") InputStream fileContainingSchema);
+ @Multipart("description") InputStream fileContainingSchema);
@GET
@Path("/{namespace}/{key}")
- @ApiOperation(value = "Get JSON schema by namespace and key",
- response = ConfigurationDataDto.class)
+ @Operation(description = "Get JSON schema by namespace and key", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ConfigurationDataDto.class))))
Response getFromTable(@PathParam("namespace") String namespace, @PathParam("key") String key);
@GET
@Path("/{namespace}")
- @ApiOperation(value = "Get List of keys and values by namespace",
- responseContainer = "List")
+ @Operation(description = "Get List of keys and descriptions by namespace", responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = ApplicationConfigDto.class)))))
Response getListOfConfigurationByNamespaceFromTable(@PathParam("namespace") String namespace);
}