summaryrefslogtreecommitdiffstats
path: root/catalog-be
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2022-12-12 19:11:39 +0000
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2022-12-12 19:28:43 +0000
commited4d851990393a1863b82b6c15484d5250897707 (patch)
tree2caacec69e2faafbf585eed7061e24a907d3aa40 /catalog-be
parentd0c0adae5bde8fa9cd97a9bb8b15662b3862fd8e (diff)
Some default responses in the generated openapi files are missing descriptions
- add description for default responses - also generate openapi files in yaml format Issue-ID: SDC-4306 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I3f55cc4765c06baee50df2ff97d8b3f717dfa201
Diffstat (limited to 'catalog-be')
-rw-r--r--catalog-be/pom.xml8
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionCatalogServlet.java6
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java6
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java2
4 files changed, 11 insertions, 11 deletions
diff --git a/catalog-be/pom.xml b/catalog-be/pom.xml
index b7931cfb51..39019cd8dd 100644
--- a/catalog-be/pom.xml
+++ b/catalog-be/pom.xml
@@ -1260,7 +1260,7 @@
<contextId>sdce-2-sdce-5</contextId>
<outputPath>${project.build.directory}/generated/swagger</outputPath>
<outputFileName>swagger-sdce-2-sdce-5</outputFileName>
- <outputFormat>JSON</outputFormat>
+ <outputFormat>JSONANDYAML</outputFormat>
<configurationFilePath>
${project.basedir}/src/main/resources/swagger-config/sdce-2-sdce-5.yaml
</configurationFilePath>
@@ -1277,7 +1277,7 @@
<contextId>sdce-4</contextId>
<outputPath>${project.build.directory}/generated/swagger</outputPath>
<outputFileName>swagger-sdce-4</outputFileName>
- <outputFormat>JSON</outputFormat>
+ <outputFormat>JSONANDYAML</outputFormat>
<configurationFilePath>
${project.basedir}/src/main/resources/swagger-config/sdce-4.yaml
</configurationFilePath>
@@ -1294,7 +1294,7 @@
<contextId>sdce-6</contextId>
<outputPath>${project.build.directory}/generated/swagger</outputPath>
<outputFileName>swagger-sdce-6</outputFileName>
- <outputFormat>JSON</outputFormat>
+ <outputFormat>JSONANDYAML</outputFormat>
<configurationFilePath>
${project.basedir}/src/main/resources/swagger-config/sdce-6.yaml
</configurationFilePath>
@@ -1311,7 +1311,7 @@
<contextId>sdce-7</contextId>
<outputPath>${project.build.directory}/generated/swagger</outputPath>
<outputFileName>swagger-sdce-7</outputFileName>
- <outputFormat>JSON</outputFormat>
+ <outputFormat>JSONANDYAML</outputFormat>
<configurationFilePath>
${project.basedir}/src/main/resources/swagger-config/sdce-7.yaml
</configurationFilePath>
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionCatalogServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionCatalogServlet.java
index 78978bebbc..ffe9bb698b 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionCatalogServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionCatalogServlet.java
@@ -106,7 +106,7 @@ public class DistributionCatalogServlet extends BeGenericServlet {
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_OCTET_STREAM)
@Operation(description = "Download service artifact", method = "GET", summary = "Returns downloaded artifact", responses = {
- @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
+ @ApiResponse(description = "default response", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
@ApiResponse(responseCode = "200", description = "The artifact is found and streamed.", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
@ApiResponse(responseCode = "400", description = "Missing 'X-ECOMP-InstanceID' HTTP header - POL5001"),
@ApiResponse(responseCode = "401", description = "ECOMP component should authenticate itself and to re-send again HTTP request with its Basic Authentication credentials - POL5002"),
@@ -173,7 +173,7 @@ public class DistributionCatalogServlet extends BeGenericServlet {
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_OCTET_STREAM)
@Operation(description = "Download resource artifact", method = "GET", summary = "Returns downloaded artifact", responses = {
- @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
+ @ApiResponse(description = "default response", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
@ApiResponse(responseCode = "200", description = "The artifact is found and streamed.", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
@ApiResponse(responseCode = "400", description = "Missing 'X-ECOMP-InstanceID' HTTP header - POL5001"),
@ApiResponse(responseCode = "401", description = "ECOMP component should authenticate itself and to re-send again HTTP request with its Basic Authentication credentials - POL5002"),
@@ -234,7 +234,7 @@ public class DistributionCatalogServlet extends BeGenericServlet {
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_OCTET_STREAM)
@Operation(description = "Download resource instance artifact", method = "GET", summary = "Returns downloaded artifact", responses = {
- @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
+ @ApiResponse(description = "default response", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
@ApiResponse(responseCode = "200", description = "The artifact is found and streamed.", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
@ApiResponse(responseCode = "400", description = "Missing 'X-ECOMP-InstanceID' HTTP header - POL5001"),
@ApiResponse(responseCode = "401", description = "ECOMP component should authenticate itself and to re-send again HTTP request with its Basic Authentication credentials - POL5002"),
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java
index 59802b27fa..9f37586ce4 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java
@@ -535,7 +535,7 @@ public class ArtifactExternalServlet extends AbstractValidationsServlet {
@Path("/{assetType}/{uuid}/artifacts/{artifactUUID}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(description = "deletes an artifact of a resource or service", method = "DELETE", summary = "deletes an artifact of a resource or service", responses = {
- @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class)))),
+ @ApiResponse(description = "default response", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class)))),
@ApiResponse(responseCode = "200", description = "Artifact deleted", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ArtifactDefinition.class)))),
@ApiResponse(responseCode = "400", description = "Missing 'X-ECOMP-InstanceID' HTTP header - POL5001"),
@ApiResponse(responseCode = "401", description = "ECOMP component should authenticate itself and to re-send again HTTP request with its Basic Authentication credentials - POL5002"),
@@ -619,7 +619,7 @@ public class ArtifactExternalServlet extends AbstractValidationsServlet {
@Path("{assetType}/{uuid}/resourceInstances/{resourceInstanceName}/artifacts/{artifactUUID}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(description = "deletes an artifact of a resource insatnce", method = "DELETE", summary = "deletes an artifact of a resource insatnce", responses = {
- @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class)))),
+ @ApiResponse(description = "default response", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class)))),
@ApiResponse(responseCode = "200", description = "Artifact deleted", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ArtifactDefinition.class)))),
@ApiResponse(responseCode = "400", description = "Missing 'X-ECOMP-InstanceID' HTTP header - POL5001"),
@ApiResponse(responseCode = "401", description = "ECOMP component should authenticate itself and to re-send again HTTP request with its Basic Authentication credentials - POL5002"),
@@ -772,7 +772,7 @@ public class ArtifactExternalServlet extends AbstractValidationsServlet {
@Path("/{assetType}/{uuid}/resourceInstances/{resourceInstanceName}/artifacts/{artifactUUID}")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
@Operation(description = "Download resource instance artifact", method = "GET", summary = "Returns downloaded artifact", responses = {
- @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class)))),
+ @ApiResponse(description = "default response", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class)))),
@ApiResponse(responseCode = "200", description = "Artifact downloaded", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
@ApiResponse(responseCode = "400", description = "Missing 'X-ECOMP-InstanceID' HTTP header - POL5001"),
@ApiResponse(responseCode = "401", description = "ECOMP component should authenticate itself and to re-send again HTTP request with its Basic Authentication credentials - POL5002"),
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java
index 9758080c2b..cb32f152d0 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java
@@ -301,7 +301,7 @@ public class AssetsDataServlet extends AbstractValidationsServlet {
@Path("/{assetType}/{uuid}/toscaModel")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
@Operation(description = "Fetch assets CSAR", method = "GET", summary = "Returns asset csar", responses = {
- @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
+ @ApiResponse(description = "default response", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
@ApiResponse(responseCode = "200", description = "ECOMP component is authenticated and list of Catalog Assets Metadata is returned", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
@ApiResponse(responseCode = "400", description = "Missing 'X-ECOMP-InstanceID' HTTP header - POL5001"),
@ApiResponse(responseCode = "401", description = "ECOMP component should authenticate itself and to re-send again HTTP request with its Basic Authentication credentials - POL5002"),