You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ap...@apache.org on 2023/10/30 09:56:48 UTC

(ignite-3) branch main updated: IGNITE-20751 Update micronaut and openapi versions (#2760)

This is an automated email from the ASF dual-hosted git repository.

apkhmv pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new ae7a5c60df IGNITE-20751 Update micronaut and openapi versions (#2760)
ae7a5c60df is described below

commit ae7a5c60df3459d4506f23d002ba63ea88841b42
Author: Aleksandr Pakhomov <ap...@gmail.com>
AuthorDate: Mon Oct 30 13:56:42 2023 +0400

    IGNITE-20751 Update micronaut and openapi versions (#2760)
---
 gradle/libs.versions.toml                          | 12 ++++----
 modules/rest-api/openapi/openapi.yaml              | 34 +++++-----------------
 .../rest/api/cluster/ClusterManagementApi.java     |  2 ++
 .../internal/rest/api/cluster/ClusterNode.java     |  1 -
 .../api/configuration/ClusterConfigurationApi.java |  1 +
 .../api/configuration/NodeConfigurationApi.java    |  1 +
 6 files changed, 17 insertions(+), 34 deletions(-)

diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index edd45fac4c..71512f347a 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -37,17 +37,17 @@ okhttp = "4.12.0"
 gson = "2.8.9"
 gsonFire = "1.8.5"
 threetenbp = "1.5.2"
-micronaut = "3.8.5"
-micronautPicocli = "4.3.0"
-micronautJunit5 = "3.9.0"
-micronautSecurity="3.9.2"
+micronaut = "3.10.2"
+micronautPicocli = "4.4.0"
+micronautJunit5 = "3.9.2"
+micronautSecurity="3.11.1"
 micronautReactor="2.5.0"
 mockito = "5.4.0"
 picocli = "4.7.0"
 slf4j = "2.0.9"
 log4j = "2.20.0"
 spoon = "8.4.0-beta-18"
-swagger = "2.2.8"
+swagger = "2.2.15"
 swaggerLegacy = "1.6.4"
 typesafe = "1.4.1"
 hamcrest = "2.2"
@@ -73,7 +73,7 @@ bytebuddy = "1.12.8"
 mockServer = "5.13.2"
 archunit = "1.1.0"
 testkit = "1.8.2"
-openapi = "4.8.6"
+openapi = "4.10.0"
 autoService = "1.0.1"
 awaitility = "4.2.0"
 progressBar = "0.9.4"
diff --git a/modules/rest-api/openapi/openapi.yaml b/modules/rest-api/openapi/openapi.yaml
index 1b2f39f785..15b7d30b95 100644
--- a/modules/rest-api/openapi/openapi.yaml
+++ b/modules/rest-api/openapi/openapi.yaml
@@ -24,10 +24,6 @@ paths:
       responses:
         "200":
           description: Cluster initialized.
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/Void'
         "500":
           description: Internal error.
           content:
@@ -167,10 +163,6 @@ paths:
       responses:
         "200":
           description: Configuration updated.
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/Void'
         "500":
           description: Internal error.
           content:
@@ -272,10 +264,6 @@ paths:
       responses:
         "200":
           description: Configuration successfully updated.
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/Void'
         "500":
           description: Internal error.
           content:
@@ -495,8 +483,7 @@ paths:
           nullable: true
           allOf:
           - $ref: '#/components/schemas/deployMode'
-          - type: object
-            description: ALL or MAJORITY.
+          - description: ALL or MAJORITY.
       - name: initialNodes
         in: query
         schema:
@@ -519,6 +506,7 @@ paths:
                   items:
                     type: string
                     format: binary
+            encoding: {}
         required: true
       responses:
         "200":
@@ -746,16 +734,13 @@ components:
           type: string
           description: Unique cluster name.
         address:
-          description: Network address of this node.
           allOf:
           - $ref: '#/components/schemas/NetworkAddress'
-          - type: object
-            description: Cluster network address information.
+          - description: Cluster network address information.
         metadata:
           allOf:
           - $ref: '#/components/schemas/NodeMetadata'
-          - type: object
-            description: Node metadata information.
+          - description: Node metadata information.
       description: Information about the cluster node.
     ClusterState:
       type: object
@@ -778,8 +763,7 @@ components:
         clusterTag:
           allOf:
           - $ref: '#/components/schemas/ClusterTag'
-          - type: object
-            description: Unique tag that identifies the cluster.
+          - description: Unique tag that identifies the cluster.
       description: Information about current cluster state.
     ClusterTag:
       type: object
@@ -922,8 +906,7 @@ components:
         state:
           allOf:
           - $ref: '#/components/schemas/State'
-          - type: object
-            description: Node status.
+          - description: Node status.
       description: Node state.
     Problem:
       type: object
@@ -993,11 +976,8 @@ components:
         status:
           allOf:
           - $ref: '#/components/schemas/DeploymentStatus'
-          - type: object
-            description: Unit status.
+          - description: Unit status.
       description: Unit version and status.
-    Void:
-      type: object
     deployMode:
       type: string
       description: Initial set of nodes to deploy.
diff --git a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/ClusterManagementApi.java b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/ClusterManagementApi.java
index dcef55e5d7..ff3908364e 100644
--- a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/ClusterManagementApi.java
+++ b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/ClusterManagementApi.java
@@ -22,6 +22,7 @@ import io.micronaut.http.annotation.Consumes;
 import io.micronaut.http.annotation.Controller;
 import io.micronaut.http.annotation.Get;
 import io.micronaut.http.annotation.Post;
+import io.micronaut.http.annotation.Produces;
 import io.micronaut.security.annotation.Secured;
 import io.micronaut.security.rules.SecurityRule;
 import io.swagger.v3.oas.annotations.Operation;
@@ -66,5 +67,6 @@ public interface ClusterManagementApi {
     @ApiResponse(responseCode = "400", description = "Incorrect configuration.",
             content = @Content(mediaType = MediaType.PROBLEM_JSON, schema = @Schema(implementation = Problem.class)))
     @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.PROBLEM_JSON)
     CompletableFuture<Void> init(@Body InitCommand initCommand);
 }
diff --git a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/ClusterNode.java b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/ClusterNode.java
index fdf651a726..4514ef62d0 100644
--- a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/ClusterNode.java
+++ b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/ClusterNode.java
@@ -35,7 +35,6 @@ public class ClusterNode {
     @Schema(description = "Unique cluster name.")
     private final String name;
 
-    /** Network address of this node. */
     @Schema(description = "Cluster network address information.")
     private final NetworkAddress address;
 
diff --git a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/configuration/ClusterConfigurationApi.java b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/configuration/ClusterConfigurationApi.java
index f9e0e075d3..fbd47a3514 100644
--- a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/configuration/ClusterConfigurationApi.java
+++ b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/configuration/ClusterConfigurationApi.java
@@ -78,6 +78,7 @@ public interface ClusterConfigurationApi {
     @ApiResponse(responseCode = "404", description = "Configuration not found. Most likely, the cluster is not initialized.",
             content = @Content(mediaType = MediaType.PROBLEM_JSON, schema = @Schema(implementation = Problem.class)))
     @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.PROBLEM_JSON)
     @Patch
     CompletableFuture<Void> updateConfiguration(
             @Body @RequestBody(description = "The cluster configuration to update.") String updatedConfiguration
diff --git a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/configuration/NodeConfigurationApi.java b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/configuration/NodeConfigurationApi.java
index c7910b674c..c9448595d0 100644
--- a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/configuration/NodeConfigurationApi.java
+++ b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/configuration/NodeConfigurationApi.java
@@ -93,6 +93,7 @@ public interface NodeConfigurationApi {
     @ApiResponse(responseCode = "400", description = "Incorrect configuration.",
             content = @Content(mediaType = MediaType.PROBLEM_JSON, schema = @Schema(implementation = Problem.class)))
     @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.PROBLEM_JSON)
     @Patch
     CompletableFuture<Void> updateConfiguration(
             @Body @RequestBody(description = "The node configuration to update.") String updatedConfiguration