From de434819e22f0803389f54e41c3348d3fbf33744 Mon Sep 17 00:00:00 2001 From: dblock Date: Mon, 18 Nov 2024 15:09:38 -0500 Subject: [PATCH] Fixed several Vale violations. Signed-off-by: dblock --- spec/namespaces/_core.yaml | 42 ++++++++++---------- spec/namespaces/cluster.yaml | 2 +- spec/namespaces/knn.yaml | 12 +++--- spec/namespaces/query.yaml | 4 +- spec/namespaces/snapshot.yaml | 2 +- spec/schemas/_common.query_dsl.yaml | 2 +- spec/schemas/_core.msearch.yaml | 2 +- spec/schemas/_core.termvectors.yaml | 8 +++- spec/schemas/cat.thread_pool.yaml | 2 +- spec/schemas/cluster.health.yaml | 4 +- spec/schemas/cluster.reroute.yaml | 2 +- spec/schemas/indices._common.yaml | 2 +- spec/schemas/indices.data_streams_stats.yaml | 2 +- spec/schemas/insights._common.yaml | 2 +- spec/schemas/nodes.info.yaml | 2 +- spec/schemas/query._common.yaml | 4 +- spec/schemas/security._common.yaml | 24 +++++------ tests/default/query/datasources.yaml | 2 +- 18 files changed, 62 insertions(+), 58 deletions(-) diff --git a/spec/namespaces/_core.yaml b/spec/namespaces/_core.yaml index 0b9a6f138..7f8b1c7f2 100644 --- a/spec/namespaces/_core.yaml +++ b/spec/namespaces/_core.yaml @@ -2711,19 +2711,19 @@ components: properties: detect_noop: description: |- - Set to false to disable setting 'result' in the response - to 'noop' if no change to the document occurred. + Set to `false` to disable setting `result` in the response + to `noop` if no change to the document occurred. type: boolean doc: description: A partial update to an existing document. type: object doc_as_upsert: - description: Set to true to use the contents of 'doc' as the value of 'upsert' + description: Set to `true` to use the contents of 'doc' as the value of 'upsert' type: boolean script: $ref: '../schemas/_common.yaml#/components/schemas/Script' scripted_upsert: - description: Set to true to execute the script whether or not the document exists. + description: Set to `true` to execute the script whether or not the document exists. type: boolean _source: $ref: '../schemas/_core.search.yaml#/components/schemas/SourceConfig' @@ -3859,35 +3859,35 @@ components: delete_by_query::query._source: name: _source in: query - description: True or false to return the _source field or not, or a list of fields to return. + description: Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. style: form schema: type: array items: type: string - description: True or false to return the _source field or not, or a list of fields to return. + description: Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. explode: true delete_by_query::query._source_excludes: name: _source_excludes in: query - description: List of fields to exclude from the returned _source field. + description: List of fields to exclude from the returned `_source` field. style: form schema: type: array items: type: string - description: List of fields to exclude from the returned _source field. + description: List of fields to exclude from the returned `_source` field. explode: true delete_by_query::query._source_includes: name: _source_includes in: query - description: List of fields to extract and return from the _source field. + description: List of fields to extract and return from the `_source` field. style: form schema: type: array items: type: string - description: List of fields to extract and return from the _source field. + description: List of fields to extract and return from the `_source` field. explode: true delete_by_query::query.allow_no_indices: in: query @@ -4398,7 +4398,7 @@ components: explain::query._source: in: query name: _source - description: True or false to return the `_source` field or not, or a list of fields to return. + description: Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. schema: $ref: '../schemas/_core.search.yaml#/components/schemas/SourceConfigParam' style: form @@ -4552,7 +4552,7 @@ components: get::query._source: in: query name: _source - description: True or false to return the _source field or not, or a list of fields to return. + description: Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. schema: $ref: '../schemas/_core.search.yaml#/components/schemas/SourceConfigParam' style: form @@ -4667,7 +4667,7 @@ components: get_source::query._source: in: query name: _source - description: True or false to return the _source field or not, or a list of fields to return. + description: Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. schema: $ref: '../schemas/_core.search.yaml#/components/schemas/SourceConfigParam' style: form @@ -4850,7 +4850,7 @@ components: mget::query._source: in: query name: _source - description: True or false to return the `_source` field or not, or a list of fields to return. + description: Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. schema: $ref: '../schemas/_core.search.yaml#/components/schemas/SourceConfigParam' style: form @@ -6094,7 +6094,7 @@ components: in: query name: _source description: |- - Set to false to disable source retrieval. You can also specify a comma-separated + Set to `false` to disable source retrieval. You can also specify a comma-separated list of the fields you want to retrieve. schema: $ref: '../schemas/_core.search.yaml#/components/schemas/SourceConfigParam' @@ -6205,35 +6205,35 @@ components: update_by_query::query._source: name: _source in: query - description: True or false to return the _source field or not, or a list of fields to return. + description: Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. style: form schema: type: array items: type: string - description: True or false to return the _source field or not, or a list of fields to return. + description: Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. explode: true update_by_query::query._source_excludes: name: _source_excludes in: query - description: List of fields to exclude from the returned _source field. + description: List of fields to exclude from the returned `_source` field. style: form schema: type: array items: type: string - description: List of fields to exclude from the returned _source field. + description: List of fields to exclude from the returned `_source` field. explode: true update_by_query::query._source_includes: name: _source_includes in: query - description: List of fields to extract and return from the _source field. + description: List of fields to extract and return from the `_source` field. style: form schema: type: array items: type: string - description: List of fields to extract and return from the _source field. + description: List of fields to extract and return from the `_source` field. explode: true update_by_query::query.allow_no_indices: in: query diff --git a/spec/namespaces/cluster.yaml b/spec/namespaces/cluster.yaml index 30ac38284..d5d81c80f 100644 --- a/spec/namespaces/cluster.yaml +++ b/spec/namespaces/cluster.yaml @@ -860,7 +860,7 @@ components: Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. Defaults to true, meaning that all excluded nodes must be removed from - the cluster before this API takes any action. If set to false then the + the cluster before this API takes any action. If set to `false` then the voting configuration exclusions list is cleared even if some excluded nodes are still in the cluster. schema: diff --git a/spec/namespaces/knn.yaml b/spec/namespaces/knn.yaml index 1a25c1a5d..8be42524e 100644 --- a/spec/namespaces/knn.yaml +++ b/spec/namespaces/knn.yaml @@ -321,35 +321,35 @@ components: knn.search_models::query._source: name: _source in: query - description: True or false to return the _source field or not, or a list of fields to return. + description: Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. style: form schema: type: array items: type: string - description: True or false to return the _source field or not, or a list of fields to return. + description: Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. explode: true knn.search_models::query._source_excludes: name: _source_excludes in: query - description: List of fields to exclude from the returned _source field. + description: List of fields to exclude from the returned `_source` field. style: form schema: type: array items: type: string - description: List of fields to exclude from the returned _source field. + description: List of fields to exclude from the returned `_source` field. explode: true knn.search_models::query._source_includes: name: _source_includes in: query - description: List of fields to extract and return from the _source field. + description: List of fields to extract and return from the `_source` field. style: form schema: type: array items: type: string - description: List of fields to extract and return from the _source field. + description: List of fields to extract and return from the `_source` field. explode: true knn.search_models::query.allow_no_indices: name: allow_no_indices diff --git a/spec/namespaces/query.yaml b/spec/namespaces/query.yaml index b055f4666..d2e76ba27 100644 --- a/spec/namespaces/query.yaml +++ b/spec/namespaces/query.yaml @@ -1,7 +1,7 @@ openapi: 3.1.0 info: - title: OpenSearch Query Datasources API - description: OpenSearch Query Datasources API. + title: OpenSearch Query Data Sources API + description: OpenSearch Query Data Sources API. version: 2.7.0 paths: /_plugins/_query/_datasources: diff --git a/spec/namespaces/snapshot.yaml b/spec/namespaces/snapshot.yaml index b24c49466..9e9b46841 100644 --- a/spec/namespaces/snapshot.yaml +++ b/spec/namespaces/snapshot.yaml @@ -826,7 +826,7 @@ components: snapshot.status::query.ignore_unavailable: in: query name: ignore_unavailable - description: Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown + description: Whether to ignore unavailable snapshots, defaults to `false` which means a SnapshotMissingException is thrown schema: type: boolean default: false diff --git a/spec/schemas/_common.query_dsl.yaml b/spec/schemas/_common.query_dsl.yaml index f4e8fdfc6..ebb7a8eaf 100644 --- a/spec/schemas/_common.query_dsl.yaml +++ b/spec/schemas/_common.query_dsl.yaml @@ -604,7 +604,7 @@ components: rewrite: $ref: '_common.yaml#/components/schemas/MultiTermQueryRewrite' transpositions: - description: Indicates whether edits include transpositions of two adjacent characters (for example `ab` to `ba`). + description: Indicates whether edits include transpositions of two adjacent characters (for example, `ab` to `ba`). type: boolean fuzziness: $ref: '_common.yaml#/components/schemas/Fuzziness' diff --git a/spec/schemas/_core.msearch.yaml b/spec/schemas/_core.msearch.yaml index e504a770f..f6a370454 100644 --- a/spec/schemas/_core.msearch.yaml +++ b/spec/schemas/_core.msearch.yaml @@ -64,7 +64,7 @@ components: items: $ref: '_common.query_dsl.yaml#/components/schemas/FieldAndFormat' knn: - description: Defines the approximate kNN search to run. + description: Defines the approximate k-NN search to run. oneOf: - $ref: '_common.query_dsl.yaml#/components/schemas/KnnQuery' - type: array diff --git a/spec/schemas/_core.termvectors.yaml b/spec/schemas/_core.termvectors.yaml index 171fd0119..1b6d0a8c8 100644 --- a/spec/schemas/_core.termvectors.yaml +++ b/spec/schemas/_core.termvectors.yaml @@ -24,7 +24,8 @@ components: type: number max_word_length: description: |- - The maximum word length above which words will be ignored. + The maximum word length. + Words longer than this value will be ignored. Default is `unbounded`. type: number min_doc_freq: @@ -34,7 +35,10 @@ components: description: Ignore words with less than this frequency in the source doc. type: number min_word_length: - description: The minimum word length below which words will be ignored. + description: |- + The minimum word length. + Words shorter than this value will be ignored. + Default is 0. type: number TermVector: type: object diff --git a/spec/schemas/cat.thread_pool.yaml b/spec/schemas/cat.thread_pool.yaml index dad47fcbb..23fdc8e18 100644 --- a/spec/schemas/cat.thread_pool.yaml +++ b/spec/schemas/cat.thread_pool.yaml @@ -21,7 +21,7 @@ components: description: The process identifier. type: string host: - description: The host name for the current node. + description: The hostname for the current node. type: string ip: description: The IP address for the current node. diff --git a/spec/schemas/cluster.health.yaml b/spec/schemas/cluster.health.yaml index 8ea9db852..300795050 100644 --- a/spec/schemas/cluster.health.yaml +++ b/spec/schemas/cluster.health.yaml @@ -31,7 +31,7 @@ components: description: The number of shards whose allocation has been delayed by the timeout settings. type: number discovered_master: - description: True if the master node has been discovered. + description: True if the cluster manager node has been discovered. type: boolean x-version-deprecated: '2.0' discovered_cluster_manager: @@ -67,7 +67,7 @@ components: task_max_waiting_in_queue_millis: $ref: '_common.yaml#/components/schemas/DurationValueUnitMillis' timed_out: - description: If false the response returned within the period of time that is specified by the timeout parameter (30s by default). + description: If `false` the response returned within the period of time that is specified by the timeout parameter (`30s` by default). type: boolean unassigned_shards: description: The number of shards that are not allocated. diff --git a/spec/schemas/cluster.reroute.yaml b/spec/schemas/cluster.reroute.yaml index 136361f0b..55ac62278 100644 --- a/spec/schemas/cluster.reroute.yaml +++ b/spec/schemas/cluster.reroute.yaml @@ -75,7 +75,7 @@ components: node: type: string accept_data_loss: - description: If a node which has a copy of the data rejoins the cluster later on, that data will be deleted. To ensure that these implications are well-understood, this command requires the flag accept_data_loss to be explicitly set to true + description: If a node which has a copy of the data rejoins the cluster later on, that data will be deleted. To ensure that these implications are well-understood, this command requires the flag `accept_data_loss` to be explicitly set to `true`. type: boolean required: - accept_data_loss diff --git a/spec/schemas/indices._common.yaml b/spec/schemas/indices._common.yaml index 1a5449c8c..34265e8e6 100644 --- a/spec/schemas/indices._common.yaml +++ b/spec/schemas/indices._common.yaml @@ -375,7 +375,7 @@ components: $ref: '_common.yaml#/components/schemas/StringifiedEpochTimeUnitMillis' parse_origination_date: description: |- - Set to true to parse the origination date from the index name. This origination date is used to calculate the index age + Set to `true` to parse the origination date from the index name. This origination date is used to calculate the index age for its phase transitions. The index name must match the pattern ^.*-{date_format}-\\d+, where the date_format is yyyy.MM.dd and the trailing digits are optional. An index that was rolled over would normally match the full format, for example logs-2016.10.31-000002). If the index name doesn't match the pattern, index creation fails. diff --git a/spec/schemas/indices.data_streams_stats.yaml b/spec/schemas/indices.data_streams_stats.yaml index be5a9b17a..216fa77ea 100644 --- a/spec/schemas/indices.data_streams_stats.yaml +++ b/spec/schemas/indices.data_streams_stats.yaml @@ -19,7 +19,7 @@ components: store_size: $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' store_size_bytes: - description: Total size, in bytes, of all shards for the data stream's backing indices. + description: Total size, in bytes, of all shards for the data stream's backing indexes. $ref: '_common.yaml#/components/schemas/ByteCount' required: - backing_indices diff --git a/spec/schemas/insights._common.yaml b/spec/schemas/insights._common.yaml index f7180c7b4..ee650c948 100644 --- a/spec/schemas/insights._common.yaml +++ b/spec/schemas/insights._common.yaml @@ -39,7 +39,7 @@ components: description: Additional labels for the query. search_type: type: string - description: The search query type (e.g., query_then_fetch). + description: The search query type (for example, `query_then_fetch`). source: type: object $ref: '#/components/schemas/Source' diff --git a/spec/schemas/nodes.info.yaml b/spec/schemas/nodes.info.yaml index 7e6e34ce2..789efa969 100644 --- a/spec/schemas/nodes.info.yaml +++ b/spec/schemas/nodes.info.yaml @@ -228,7 +228,7 @@ components: description: Number of processors available to the Java virtual machine type: number allocated_processors: - description: The number of processors actually used to calculate thread pool size. This number can be set with the node.processors setting of a node and defaults to the number of processors reported by the OS. + description: The number of processors actually used to calculate thread pool size. This number can be set with the `node.processors` setting of a node and defaults to the number of processors reported by the OS. type: number name: $ref: '_common.yaml#/components/schemas/Name' diff --git a/spec/schemas/query._common.yaml b/spec/schemas/query._common.yaml index ef4e315f4..e6511cc8f 100644 --- a/spec/schemas/query._common.yaml +++ b/spec/schemas/query._common.yaml @@ -1,7 +1,7 @@ openapi: 3.1.0 info: - title: Schemas for OpenSearch Query Datasources API - description: Schemas for OpenSearch Query Datasources API + title: Schemas for OpenSearch Query Data Sources API + description: Schemas for OpenSearch Query Data Sources API version: 1.0.0 paths: {} components: diff --git a/spec/schemas/security._common.yaml b/spec/schemas/security._common.yaml index bfa282ed2..c754e2325 100644 --- a/spec/schemas/security._common.yaml +++ b/spec/schemas/security._common.yaml @@ -64,7 +64,7 @@ components: type: boolean requests: type: object - description: An object with APIs as key and array of http methods as values. + description: An object with APIs as key and array of HTTP methods as values. AuditConfig: type: object @@ -131,7 +131,7 @@ components: properties: user: type: string - description: Stringified User object. + description: A User object as a string. user_name: type: string description: User's name. @@ -167,7 +167,7 @@ components: description: Number of peer certificates. sso_logout_url: type: ['null', string] - description: Logout url. + description: Logout URL. size_of_user: type: string description: Size of user in memory. @@ -420,7 +420,7 @@ components: description: The generated OBO token. durationSeconds: type: string - description: The duration of the token, defaulted to 300s. + description: The duration of the token. Default is `300s`. HealthInfo: type: object @@ -550,7 +550,7 @@ components: type: boolean disabled_endpoints: type: object - description: An object with disabled APIs as key and array of http methods as values. + description: An object with disabled APIs as key and array of HTTP methods as values. Role: type: object @@ -639,22 +639,22 @@ components: type: string ssl_protocol: type: ['null',string] - description: Protocol for this ssl setup. + description: Protocol for this SSL setup. ssl_cipher: type: ['null',string] - description: Cipher for this ssl setup. + description: Cipher for this SSL setup. ssl_openssl_available: type: boolean - description: A boolean to indicate if OpenSSL is available. + description: A Boolean to indicate if OpenSSL is available. ssl_openssl_version: type: [number, string] - description: Version of openssl. + description: Version of OpenSSL. ssl_openssl_version_string: type: ['null', string] - description: Full version string for openssl version. + description: Full version string for OpenSSL version. ssl_openssl_non_available_cause: type: ['null', string] - description: Reason for openssl unavailability. + description: Reason for OpenSSL unavailability. ssl_openssl_supports_key_manager_factory: type: boolean description: Indicates where KMF is supported. @@ -663,7 +663,7 @@ components: description: Indicates whether hostname validation is supported. ssl_provider_http: type: ['null',string] - description: Returns http provider's name. + description: Returns HTTP provider's name. ssl_provider_transport_server: type: string description: Returns transport server's name. diff --git a/tests/default/query/datasources.yaml b/tests/default/query/datasources.yaml index 80ad12800..7ea3fead4 100644 --- a/tests/default/query/datasources.yaml +++ b/tests/default/query/datasources.yaml @@ -1,6 +1,6 @@ $schema: ../../../json_schemas/test_story.schema.yaml -description: Test various operations of the OpenSearch Query Datasources API. +description: Test various operations of the OpenSearch Query Data Sources API. version: '>=2.7' distributions: excluded: