summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml2
-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
2 files changed, 16 insertions, 10 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml
index 3e8d8e9160..816bcb841a 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml
@@ -15,7 +15,7 @@
<dependencies>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>
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);
}