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 18fa91c808 IGNITE-19196 Reviewed text in REST API (#1889)
18fa91c808 is described below
commit 18fa91c8088ba7cc96fbb0f5d28d5f8d31bfa515
Author: IgGusev <[email protected]>
AuthorDate: Tue Apr 4 16:13:16 2023 +0400
IGNITE-19196 Reviewed text in REST API (#1889)
---
modules/rest-api/openapi/openapi.yaml | 71 +++++++++++++---------
.../apache/ignite/internal/rest/api/Problem.java | 4 +-
.../rest/api/cluster/ClusterManagementApi.java | 2 +-
.../internal/rest/api/cluster/InitCommand.java | 6 +-
.../rest/api/cluster/NetworkAddressDto.java | 2 +-
.../authentication/AuthenticationConfigDto.java | 2 +-
.../AuthenticationProviderConfigDto.java | 2 +-
.../BasicAuthenticationProviderConfigDto.java | 9 +--
.../api/configuration/ClusterConfigurationApi.java | 2 +-
.../api/configuration/NodeConfigurationApi.java | 2 +-
.../rest/api/deployment/DeploymentCodeApi.java | 45 ++++++++------
.../rest/api/deployment/UnitStatusDto.java | 2 +-
.../internal/rest/api/metric/MetricSetDto.java | 2 +-
.../internal/rest/api/metric/MetricSourceDto.java | 2 +-
.../internal/rest/api/metric/NodeMetricApi.java | 8 +--
15 files changed, 89 insertions(+), 72 deletions(-)
diff --git a/modules/rest-api/openapi/openapi.yaml
b/modules/rest-api/openapi/openapi.yaml
index 53cd30ff45..aedb57fda3 100644
--- a/modules/rest-api/openapi/openapi.yaml
+++ b/modules/rest-api/openapi/openapi.yaml
@@ -55,7 +55,8 @@ paths:
schema:
$ref: '#/components/schemas/ClusterState'
"404":
- description: "Cluster state not found. Most likely, the cluster is
not initialized."
+ description: "Cluster status not found. Most likely, the cluster is
not\
+ \ initialized."
content:
application/problem+json:
schema:
@@ -126,7 +127,7 @@ paths:
parameters: []
responses:
"200":
- description: Get cluster configuration
+ description: Received cluster configuration.
content:
text/plain:
schema:
@@ -236,7 +237,7 @@ paths:
parameters: []
responses:
"200":
- description: Whole node configuration.
+ description: Full node configuration.
content:
text/plain:
schema:
@@ -343,7 +344,7 @@ paths:
post:
tags:
- deployment
- description: Deploy provided unit to the cluster.
+ description: Deploys provided unit to the cluster.
operationId: deployUnit
parameters: []
requestBody:
@@ -359,12 +360,15 @@ paths:
required:
- "true"
type: string
+ description: The ID of the deployment unit.
unitVersion:
type: string
+ description: The version of the deployment unit.
unitContent:
required:
- "true"
type: string
+ description: The code to deploy.
format: binary
required: true
responses:
@@ -375,7 +379,7 @@ paths:
schema:
type: boolean
"409":
- description: Unit with same identifier and version already deployed.
+ description: Unit with same identifier and version is already
deployed.
content:
application/problem+json:
schema:
@@ -390,7 +394,7 @@ paths:
get:
tags:
- deployment
- description: Status of units which deployed on node.
+ description: Returns the status of units that are deployed on the node.
operationId: byConsistentId
parameters:
- name: consistentId
@@ -400,6 +404,7 @@ paths:
required:
- "true"
type: string
+ description: The consistent deployment unit identifier.
responses:
"200":
description: All statuses returned successfully.
@@ -419,7 +424,7 @@ paths:
delete:
tags:
- deployment
- description: Undeploy latest unit with provided unitId.
+ description: Undeploys the latest unit with the provided unitId.
operationId: undeployLatestUnit
parameters:
- name: unitId
@@ -429,6 +434,7 @@ paths:
required:
- "true"
type: string
+ description: The ID of the deployment unit.
responses:
"200":
description: Unit undeployed successfully.
@@ -437,7 +443,7 @@ paths:
schema:
$ref: '#/components/schemas/Void'
"404":
- description: Unit with provided identifier and version doesn't exist.
+ description: Unit with provided identifier and version does not
exist.
content:
application/problem+json:
schema:
@@ -452,7 +458,7 @@ paths:
get:
tags:
- deployment
- description: Status of unit with provided identifier.
+ description: Returns the status of the unit with the provided identifier.
operationId: status
parameters:
- name: unitId
@@ -462,6 +468,7 @@ paths:
required:
- "true"
type: string
+ description: The ID of the deployment unit.
responses:
"200":
description: Status returned successfully.
@@ -470,7 +477,7 @@ paths:
schema:
$ref: '#/components/schemas/UnitStatus'
"404":
- description: Unit with provided identifier doesn't exist.
+ description: Unit with provided identifier does not exist.
content:
application/problem+json:
schema:
@@ -485,7 +492,7 @@ paths:
get:
tags:
- deployment
- description: All versions of unit with provided unit identifier.
+ description: Returns all versions of the unit with the provided unit
identifier.
operationId: versions
parameters:
- name: unitId
@@ -495,6 +502,7 @@ paths:
required:
- "true"
type: string
+ description: The ID of the deployment unit.
responses:
"200":
description: Versions returned successfully.
@@ -505,7 +513,7 @@ paths:
items:
type: string
"404":
- description: Unit with provided identifier doesn't exist.
+ description: Unit with the provided identifier does not exist.
content:
application/problem+json:
schema:
@@ -520,7 +528,7 @@ paths:
delete:
tags:
- deployment
- description: Undeploy unit with provided unitId and unitVersion.
+ description: Undeploys the unit with provided unitId and unitVersion.
operationId: undeployUnit
parameters:
- name: unitId
@@ -530,6 +538,7 @@ paths:
required:
- "true"
type: string
+ description: The ID of the deployment unit.
- name: unitVersion
in: path
required: true
@@ -537,6 +546,7 @@ paths:
required:
- "true"
type: string
+ description: The version of the deployment unit.
responses:
"200":
description: Unit undeployed successfully.
@@ -545,7 +555,7 @@ paths:
schema:
$ref: '#/components/schemas/Void'
"404":
- description: Unit with provided identifier and version doesn't exist.
+ description: Unit with provided identifier and version does not
exist.
content:
application/problem+json:
schema:
@@ -560,7 +570,7 @@ paths:
post:
tags:
- nodeMetric
- description: Disables a specific metric source.
+ description: Disables the specified metric source.
operationId: disableNodeMetric
parameters: []
requestBody:
@@ -588,7 +598,7 @@ paths:
post:
tags:
- nodeMetric
- description: Enables a specific metric source.
+ description: Enables the specified metric source.
operationId: enableNodeMetric
parameters: []
requestBody:
@@ -616,7 +626,7 @@ paths:
get:
tags:
- nodeMetric
- description: Provides a list of all enabled metric sets.
+ description: Gets a list of all enabled metric sets.
operationId: listNodeMetricSets
parameters: []
responses:
@@ -638,7 +648,7 @@ paths:
get:
tags:
- nodeMetric
- description: Provides a list of all available metric sources.
+ description: Gets a list of all available metric sources.
operationId: listNodeMetricSources
parameters: []
responses:
@@ -703,7 +713,7 @@ components:
properties:
enabled:
type: boolean
- description: If Security is enabled.
+ description: "If True, security is enabled. Otherwise it is not."
providers:
type: array
description: A list of authentication providers.
@@ -712,7 +722,7 @@ components:
description: REST representation of AuthenticationConfig.
AuthenticationProviderConfig:
type: object
- description: Authentication provider configuration
+ description: Configuration for the authentication provider.
discriminator:
propertyName: type
mapping:
@@ -733,7 +743,7 @@ components:
description: Provider name.
type:
type: string
- description: REST representation of BasicAuthenticationProviderConfig.
+ description: Configuration for basic authentication.
ClusterNode:
type: object
properties:
@@ -798,7 +808,7 @@ components:
description: The name of the cluster.
authenticationConfig:
$ref: '#/components/schemas/AuthenticationConfig'
- description: Cluster initialization data.
+ description: Cluster initialization configuration.
InvalidParam:
type: object
properties:
@@ -837,7 +847,7 @@ components:
required:
- "true"
type: array
- description: List of metrics.
+ description: A list of metrics.
items:
$ref: '#/components/schemas/Metric'
description: REST representation of MetricSet.
@@ -858,13 +868,13 @@ components:
type: boolean
description: "If True, the metric is tracked. Otherwise, the metric
is not\
\ tracked."
- description: Metric sources provided by modules.
+ description: A list of metric sources provided by modules.
NetworkAddress:
type: object
properties:
host:
type: string
- description: Name of the host node is on.
+ description: Name of the host node runs on.
port:
type: integer
description: Port the node runs on.
@@ -918,12 +928,13 @@ components:
description: Name of the node the issue happened on.
traceId:
type: string
- description: Unique issue identifier. Thid identifier can be used to
find
- logs related to the issue
+ description: Unique issue identifier. This identifier can be used to
find
+ logs related to the issue.
format: uuid
invalidParams:
type: array
- description: Parameters that did not pass validation.
+ description: A list of parameters that did not pass validation and
the reason
+ for it.
items:
$ref: '#/components/schemas/InvalidParam'
description: Extended description of the problem with the request.
@@ -949,8 +960,8 @@ components:
type: array
items:
type: string
- description: Returns map from existing unit version to list of nodes
consistent
- ids where unit deployed.
+ description: Returns the map of existing unit versions mapped to the
list
+ of node consistent ids where these units are deployed.
description: Unit status.
Void:
type: object
diff --git
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/Problem.java
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/Problem.java
index bba7dd9ce0..0db38b32cf 100644
---
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/Problem.java
+++
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/Problem.java
@@ -58,11 +58,11 @@ public class Problem {
private final String node;
/** Unique identifier that will help to trace the error in the log
(optional). */
- @Schema(description = "Unique issue identifier. Thid identifier can be
used to find logs related to the issue")
+ @Schema(description = "Unique issue identifier. This identifier can be
used to find logs related to the issue.")
private final UUID traceId;
/** List of parameters that did not pass the validation (optional). */
- @Schema(description = "Parameters that did not pass validation.")
+ @Schema(description = "A list of parameters that did not pass validation
and the reason for it.")
private final Collection<InvalidParam> invalidParams;
/** Constructor. */
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 40b6c490d4..aaf6d10a38 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
@@ -48,7 +48,7 @@ public interface ClusterManagementApi {
@Operation(operationId = "clusterState", description = "Returns current
cluster status.")
@ApiResponse(responseCode = "200", description = "Cluster status
returned.",
content = @Content(mediaType = MediaType.APPLICATION_JSON, schema
= @Schema(implementation = ClusterStateDto.class)))
- @ApiResponse(responseCode = "404", description = "Cluster state not found.
Most likely, the cluster is not initialized.",
+ @ApiResponse(responseCode = "404", description = "Cluster status not
found. Most likely, the cluster is not initialized.",
content = @Content(mediaType = MediaType.PROBLEM_JSON, schema =
@Schema(implementation = Problem.class)))
@ApiResponse(responseCode = "500", description = "Internal error.",
content = @Content(mediaType = MediaType.PROBLEM_JSON, schema =
@Schema(implementation = Problem.class)))
diff --git
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/InitCommand.java
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/InitCommand.java
index 15e4ed422c..daba36ccb2 100644
---
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/InitCommand.java
+++
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/InitCommand.java
@@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable;
/**
* REST command for initializing a cluster.
*/
-@Schema(description = "Cluster initialization data.")
+@Schema(description = "Cluster initialization configuration.")
public class InitCommand {
@Schema(description = "A list of RAFT metastorage nodes.")
private final Collection<String> metaStorageNodes;
@@ -60,7 +60,7 @@ public class InitCommand {
Objects.requireNonNull(clusterName);
if (metaStorageNodes.isEmpty()) {
- throw new IllegalArgumentException("Meta Storage node names list
must not be empty");
+ throw new IllegalArgumentException("Meta Storage node names list
must not be empty.");
}
if (metaStorageNodes.stream().anyMatch(StringUtils::nullOrBlank)) {
@@ -72,7 +72,7 @@ public class InitCommand {
}
if (clusterName.isBlank()) {
- throw new IllegalArgumentException("Cluster name must not be
empty");
+ throw new IllegalArgumentException("Cluster name must not be
empty.");
}
this.metaStorageNodes = List.copyOf(metaStorageNodes);
diff --git
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/NetworkAddressDto.java
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/NetworkAddressDto.java
index 5735f78345..3f778946f9 100644
---
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/NetworkAddressDto.java
+++
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/NetworkAddressDto.java
@@ -29,7 +29,7 @@ import org.apache.ignite.network.NetworkAddress;
@Schema(name = "NetworkAddress", description = "Node network address
information.")
public class NetworkAddressDto {
/** Host. */
- @Schema(description = "Name of the host node is on.")
+ @Schema(description = "Name of the host node runs on.")
private final String host;
/** Port. */
diff --git
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/authentication/AuthenticationConfigDto.java
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/authentication/AuthenticationConfigDto.java
index c36326f279..f776140c35 100644
---
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/authentication/AuthenticationConfigDto.java
+++
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/authentication/AuthenticationConfigDto.java
@@ -29,7 +29,7 @@ import org.apache.ignite.security.AuthenticationConfig;
@Schema(name = "AuthenticationConfig")
public class AuthenticationConfigDto {
- @Schema(description = "If Security is enabled.")
+ @Schema(description = "If True, security is enabled. Otherwise it is not.")
private final boolean enabled;
@Schema(description = "A list of authentication providers.")
diff --git
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/authentication/AuthenticationProviderConfigDto.java
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/authentication/AuthenticationProviderConfigDto.java
index aa121f9bd7..e28f7ad5f8 100644
---
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/authentication/AuthenticationProviderConfigDto.java
+++
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/authentication/AuthenticationProviderConfigDto.java
@@ -35,7 +35,7 @@ import org.apache.ignite.security.AuthenticationType;
})
@Schema(
name = "AuthenticationProviderConfig",
- description = "Authentication provider configuration",
+ description = "Configuration for the authentication provider.",
discriminatorProperty = "type",
discriminatorMapping = {
@DiscriminatorMapping(value = "basic", schema =
BasicAuthenticationProviderConfigDto.class)
diff --git
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/authentication/BasicAuthenticationProviderConfigDto.java
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/authentication/BasicAuthenticationProviderConfigDto.java
index e023c96435..a8d1c15623 100644
---
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/authentication/BasicAuthenticationProviderConfigDto.java
+++
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/cluster/authentication/BasicAuthenticationProviderConfigDto.java
@@ -29,7 +29,7 @@ import
org.apache.ignite.security.BasicAuthenticationProviderConfig;
* REST representation of {@link BasicAuthenticationProviderConfig}.
*/
@JsonTypeName("basic")
-@Schema(name = "BasicAuthenticationProviderConfig")
+@Schema(name = "BasicAuthenticationProviderConfig", description =
"Configuration for basic authentication.")
public class BasicAuthenticationProviderConfigDto implements
AuthenticationProviderConfigDto {
@Schema(description = "Provider name.")
@@ -48,15 +48,15 @@ public class BasicAuthenticationProviderConfigDto
implements AuthenticationProvi
@JsonProperty("login") String login,
@JsonProperty("password") String password) {
if (StringUtils.nullOrBlank(name)) {
- throw new IllegalArgumentException("Name must not be empty");
+ throw new IllegalArgumentException("Name must not be empty.");
}
if (StringUtils.nullOrBlank(login)) {
- throw new IllegalArgumentException("Login must not be empty");
+ throw new IllegalArgumentException("Login must not be empty.");
}
if (StringUtils.nullOrBlank(password)) {
- throw new IllegalArgumentException("Password must not be empty");
+ throw new IllegalArgumentException("Password must not be empty.");
}
this.name = name;
@@ -76,6 +76,7 @@ public class BasicAuthenticationProviderConfigDto implements
AuthenticationProvi
@JsonProperty
@Override
+ @Schema(description = "Authentication type to use.")
public AuthenticationType type() {
return AuthenticationType.BASIC;
}
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 689dd38754..e2804751d2 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
@@ -53,7 +53,7 @@ public interface ClusterConfigurationApi {
@ApiResponse(
responseCode = "200",
content = @Content(mediaType = MediaType.TEXT_PLAIN, schema =
@Schema(type = "string")),
- description = "Get cluster configuration")
+ description = "Received cluster configuration.")
@ApiResponse(responseCode = "500", description = "Internal error.",
content = @Content(mediaType = MediaType.PROBLEM_JSON, schema =
@Schema(implementation = Problem.class)))
@ApiResponse(responseCode = "400", description = "Incorrect
configuration.",
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 dcc64075e3..1610af4634 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
@@ -54,7 +54,7 @@ public interface NodeConfigurationApi {
@ApiResponse(responseCode = "200",
content = @Content(mediaType = MediaType.TEXT_PLAIN,
schema = @Schema(type = "string")),
- description = "Whole node configuration.")
+ description = "Full node configuration.")
@ApiResponse(responseCode = "500", description = "Internal error.",
content = @Content(mediaType = MediaType.PROBLEM_JSON, schema =
@Schema(implementation = Problem.class)))
@ApiResponse(responseCode = "400", description = "Incorrect
configuration.",
diff --git
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/deployment/DeploymentCodeApi.java
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/deployment/DeploymentCodeApi.java
index 80d40554c4..a3bf64202d 100644
---
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/deployment/DeploymentCodeApi.java
+++
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/deployment/DeploymentCodeApi.java
@@ -49,11 +49,11 @@ public interface DeploymentCodeApi {
/**
* Deploy unit REST method.
*/
- @Operation(operationId = "deployUnit", description = "Deploy provided unit
to the cluster.")
+ @Operation(operationId = "deployUnit", description = "Deploys provided
unit to the cluster.")
@ApiResponse(responseCode = "200", description = "Unit deployed
successfully.",
content = @Content(mediaType = APPLICATION_JSON, schema =
@Schema(type = "boolean"))
)
- @ApiResponse(responseCode = "409", description = "Unit with same
identifier and version already deployed.",
+ @ApiResponse(responseCode = "409", description = "Unit with same
identifier and version is already deployed.",
content = @Content(mediaType = PROBLEM_JSON, schema =
@Schema(implementation = Problem.class))
)
@ApiResponse(responseCode = "500", description = "Internal error.",
@@ -66,21 +66,21 @@ public interface DeploymentCodeApi {
})
@Post("units")
CompletableFuture<Boolean> deploy(
- @Schema(name = "unitId", required = true) String unitId,
- @Schema(name = "unitVersion") String unitVersion,
- @Schema(name = "unitContent", required = true) CompletedFileUpload
unitContent);
+ @Schema(name = "unitId", description = "The ID of the deployment
unit.", required = true) String unitId,
+ @Schema(name = "unitVersion", description = "The version of the
deployment unit.") String unitVersion,
+ @Schema(name = "unitContent", description = "The code to
deploy.", required = true) CompletedFileUpload unitContent);
/**
* Undeploy unit REST method.
*/
- @Operation(operationId = "undeployUnit", description = "Undeploy unit with
provided unitId and unitVersion.")
+ @Operation(operationId = "undeployUnit", description = "Undeploys the unit
with provided unitId and unitVersion.")
@ApiResponse(responseCode = "200",
description = "Unit undeployed successfully.",
//DO NOT Remove redundant parameter. It will BREAK generated spec.
content = @Content(mediaType = APPLICATION_JSON, schema =
@Schema(implementation = Void.class))
)
@ApiResponse(responseCode = "404",
- description = "Unit with provided identifier and version doesn't
exist.",
+ description = "Unit with provided identifier and version does not
exist.",
content = @Content(mediaType = PROBLEM_JSON, schema =
@Schema(implementation = Problem.class))
)
@ApiResponse(responseCode = "500",
@@ -94,20 +94,21 @@ public interface DeploymentCodeApi {
})
@Delete("units/{unitId}/{unitVersion}")
CompletableFuture<Void> undeploy(
- @PathVariable("unitId") @Schema(name = "unitId", required = true)
String unitId,
- @PathVariable("unitVersion") @Schema(name = "unitVersion",
required = true) String unitVersion);
+ @PathVariable("unitId") @Schema(name = "unitId", description =
"The ID of the deployment unit.", required = true) String unitId,
+ @PathVariable("unitVersion") @Schema(name = "unitVersion",
+ description = "The version of the deployment unit.",
required = true) String unitVersion);
/**
* Undeploy latest unit REST method.
*/
- @Operation(operationId = "undeployLatestUnit", description = "Undeploy
latest unit with provided unitId.")
+ @Operation(operationId = "undeployLatestUnit", description = "Undeploys
the latest unit with the provided unitId.")
@ApiResponse(responseCode = "200",
description = "Unit undeployed successfully.",
//DO NOT Remove redundant parameter. It will BREAK generated spec.
content = @Content(mediaType = APPLICATION_JSON, schema =
@Schema(implementation = Void.class))
)
@ApiResponse(responseCode = "404",
- description = "Unit with provided identifier and version doesn't
exist.",
+ description = "Unit with provided identifier and version does not
exist.",
content = @Content(mediaType = PROBLEM_JSON, schema =
@Schema(implementation = Problem.class))
)
@ApiResponse(responseCode = "500",
@@ -121,7 +122,8 @@ public interface DeploymentCodeApi {
})
@Delete("units/{unitId}")
CompletableFuture<Void> undeploy(
- @PathVariable("unitId") @Schema(name = "unitId", required = true)
String unitId);
+ @PathVariable("unitId") @Schema(name = "unitId",
+ description = "The ID of the deployment unit.", required =
true) String unitId);
/**
* All units status REST method.
@@ -146,13 +148,13 @@ public interface DeploymentCodeApi {
/**
* Versions of unit REST method.
*/
- @Operation(operationId = "versions", description = "All versions of unit
with provided unit identifier.")
+ @Operation(operationId = "versions", description = "Returns all versions
of the unit with the provided unit identifier.")
@ApiResponse(responseCode = "200",
description = "Versions returned successfully.",
content = @Content(mediaType = APPLICATION_JSON, array =
@ArraySchema(schema = @Schema(implementation = String.class)))
)
@ApiResponse(responseCode = "404",
- description = "Unit with provided identifier doesn't exist.",
+ description = "Unit with the provided identifier does not exist.",
content = @Content(mediaType = PROBLEM_JSON, schema =
@Schema(implementation = Problem.class))
)
@ApiResponse(responseCode = "500", description = "Internal error.",
@@ -164,18 +166,19 @@ public interface DeploymentCodeApi {
})
@Get("units/{unitId}/versions")
CompletableFuture<Collection<String>> versions(
- @PathVariable("unitId") @Schema(name = "unitId", required = true)
String unitId);
+ @PathVariable("unitId") @Schema(name = "unitId",
+ description = "The ID of the deployment unit.", required =
true) String unitId);
/**
* Unit status REST method.
*/
- @Operation(operationId = "status", description = "Status of unit with
provided identifier.")
+ @Operation(operationId = "status", description = "Returns the status of
the unit with the provided identifier.")
@ApiResponse(responseCode = "200",
description = "Status returned successfully.",
content = @Content(mediaType = APPLICATION_JSON, schema =
@Schema(implementation = UnitStatusDto.class))
)
@ApiResponse(responseCode = "404",
- description = "Unit with provided identifier doesn't exist.",
+ description = "Unit with provided identifier does not exist.",
content = @Content(mediaType = PROBLEM_JSON, schema =
@Schema(implementation = Problem.class))
)
@ApiResponse(responseCode = "500",
@@ -189,12 +192,13 @@ public interface DeploymentCodeApi {
})
@Get("units/{unitId}/status")
CompletableFuture<UnitStatusDto> status(
- @PathVariable("unitId") @Schema(name = "unitId", required = true)
String unitId);
+ @PathVariable("unitId") @Schema(name = "unitId",
+ description = "The ID of the deployment unit.", required =
true) String unitId);
/**
* Find unit by node consistent id.
*/
- @Operation(operationId = "byConsistentId", description = "Status of units
which deployed on node.")
+ @Operation(operationId = "byConsistentId", description = "Returns the
status of units that are deployed on the node.")
@ApiResponse(responseCode = "200",
description = "All statuses returned successfully.",
content = @Content(mediaType = APPLICATION_JSON, array =
@ArraySchema(schema = @Schema(implementation = UnitStatusDto.class)))
@@ -210,5 +214,6 @@ public interface DeploymentCodeApi {
})
@Get("units/consistentId/{consistentId}")
CompletableFuture<Collection<UnitStatusDto>> findByConsistentId(
- @PathVariable("consistentId") @Schema(name = "consistentId",
required = true) String consistentId);
+ @PathVariable("consistentId") @Schema(name = "consistentId",
+ description = "The consistent deployment unit
identifier.", required = true) String consistentId);
}
diff --git
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/deployment/UnitStatusDto.java
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/deployment/UnitStatusDto.java
index bdee9ec6a7..a294add462 100644
---
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/deployment/UnitStatusDto.java
+++
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/deployment/UnitStatusDto.java
@@ -58,7 +58,7 @@ public class UnitStatusDto {
}
/**
- * Returns map from existing unit version to list of nodes consistent ids
where unit deployed.
+ * Returns the map of existing unit versions mapped to the list of node
consistent ids where these units are deployed.
*
* @return Map from existing unit version to list of nodes consistent ids
where unit deployed.
*/
diff --git
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/metric/MetricSetDto.java
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/metric/MetricSetDto.java
index 691a5cb1d1..48ed2dce65 100644
---
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/metric/MetricSetDto.java
+++
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/metric/MetricSetDto.java
@@ -33,7 +33,7 @@ public class MetricSetDto {
private final String name;
/** Metrics. */
- @Schema(description = "List of metrics.", required = true)
+ @Schema(description = "A list of metrics.", required = true)
private final Collection<MetricDto> metrics;
/**
diff --git
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/metric/MetricSourceDto.java
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/metric/MetricSourceDto.java
index d0088ef047..ea8da2d0d8 100644
---
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/metric/MetricSourceDto.java
+++
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/metric/MetricSourceDto.java
@@ -25,7 +25,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
/**
* REST representation of MetricSource.
*/
-@Schema(name = "MetricSource", description = "Metric sources provided by
modules.")
+@Schema(name = "MetricSource", description = "A list of metric sources
provided by modules.")
public class MetricSourceDto {
/** Name of the metric source. */
@Schema(description = "Metric source name.", required = true)
diff --git
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/metric/NodeMetricApi.java
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/metric/NodeMetricApi.java
index 3ccf12b913..d5bd08376d 100644
---
a/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/metric/NodeMetricApi.java
+++
b/modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/metric/NodeMetricApi.java
@@ -41,7 +41,7 @@ import org.apache.ignite.internal.rest.constants.MediaType;
public interface NodeMetricApi {
/** Enable metric source. */
- @Operation(operationId = "enableNodeMetric", description = "Enables a
specific metric source.")
+ @Operation(operationId = "enableNodeMetric", description = "Enables the
specified metric source.")
@ApiResponse(responseCode = "200", description = "Metric source enabled.")
@ApiResponse(responseCode = "500", description = "Internal error.",
content = @Content(mediaType = MediaType.PROBLEM_JSON, schema =
@Schema(implementation = Problem.class)))
@@ -53,7 +53,7 @@ public interface NodeMetricApi {
void enable(@Body String srcName);
/** Disable metric source. */
- @Operation(operationId = "disableNodeMetric", description = "Disables a
specific metric source.")
+ @Operation(operationId = "disableNodeMetric", description = "Disables the
specified metric source.")
@ApiResponse(responseCode = "200", description = "Metric source disabled.")
@ApiResponse(responseCode = "500", description = "Internal error.",
content = @Content(mediaType = MediaType.PROBLEM_JSON, schema =
@Schema(implementation = Problem.class)))
@@ -65,7 +65,7 @@ public interface NodeMetricApi {
void disable(@Body String srcName);
/** List metric sources. */
- @Operation(operationId = "listNodeMetricSources", description = "Provides
a list of all available metric sources.")
+ @Operation(operationId = "listNodeMetricSources", description = "Gets a
list of all available metric sources.")
@ApiResponse(responseCode = "200", description = "Returned a list of
metric sources.")
@ApiResponse(responseCode = "500", description = "Internal error.",
content = @Content(mediaType = MediaType.PROBLEM_JSON, schema =
@Schema(implementation = Problem.class)))
@@ -74,7 +74,7 @@ public interface NodeMetricApi {
Collection<MetricSourceDto> listMetricSources();
/** List metric sets. */
- @Operation(operationId = "listNodeMetricSets", description = "Provides a
list of all enabled metric sets.")
+ @Operation(operationId = "listNodeMetricSets", description = "Gets a list
of all enabled metric sets.")
@ApiResponse(responseCode = "200", description = "Returned a list of
metric sets.")
@ApiResponse(responseCode = "500", description = "Internal error",
content = @Content(mediaType = MediaType.PROBLEM_JSON, schema =
@Schema(implementation = Problem.class)))