From e27ec683837ccc477e5513e77a24337a98993e1c Mon Sep 17 00:00:00 2001 From: Archer Date: Mon, 13 Jan 2025 16:37:07 -0600 Subject: [PATCH] Add CAT API automation with updated spec-insert Signed-off-by: Archer --- _api-reference/cat/cat-aliases.md | 6 +++--- _api-reference/cat/cat-allocation.md | 6 +++--- _api-reference/cat/cat-cluster_manager.md | 6 +++--- _api-reference/cat/cat-count.md | 6 +++--- _api-reference/cat/cat-field-data.md | 6 +++--- _api-reference/cat/cat-health.md | 6 +++--- _api-reference/cat/cat-indices.md | 6 +++--- _api-reference/cat/cat-nodeattrs.md | 6 +++--- _api-reference/cat/cat-nodes.md | 6 +++--- _api-reference/cat/cat-pending-tasks.md | 6 +++--- _api-reference/cat/cat-pit-segments.md | 7 +++---- _api-reference/cat/cat-plugins.md | 6 +++--- _api-reference/cat/cat-recovery.md | 6 +++--- _api-reference/cat/cat-repositories.md | 6 +++--- _api-reference/cat/cat-segment-replication.md | 2 +- _api-reference/cat/cat-segments.md | 2 +- _api-reference/cat/cat-shards.md | 2 +- _api-reference/cat/cat-snapshots.md | 2 +- _api-reference/cat/cat-tasks.md | 2 +- _api-reference/cat/cat-templates.md | 2 +- _api-reference/cat/cat-thread-pool.md | 2 +- spec-insert/lib/renderers/templates/endpoints.mustache | 1 - .../lib/renderers/templates/path_parameters.mustache | 1 - .../lib/renderers/templates/query_parameters.mustache | 1 - spec-insert/spec/_fixtures/expected_output/endpoints.md | 2 -- spec-insert/spec/_fixtures/expected_output/param_tables.md | 1 - 26 files changed, 49 insertions(+), 56 deletions(-) diff --git a/_api-reference/cat/cat-aliases.md b/_api-reference/cat/cat-aliases.md index d6ef4138d3..3a4580932a 100644 --- a/_api-reference/cat/cat-aliases.md +++ b/_api-reference/cat/cat-aliases.md @@ -22,7 +22,6 @@ api: cat.aliases component: endpoints --> ## Endpoints - ```json GET /_cat/aliases GET /_cat/aliases/{name} @@ -33,13 +32,14 @@ GET /_cat/aliases/{name} ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `expand_wildcards` | List or String | Expands wildcard expressions to concrete indexes. Combine multiple values with commas. Supported values are `all`, `open`, `closed`, `hidden`, and `none`. | `format` | String | A short version of the `Accept` header, such as `json` or `yaml`. | diff --git a/_api-reference/cat/cat-allocation.md b/_api-reference/cat/cat-allocation.md index 6476d2ef2d..eba28f9e3b 100644 --- a/_api-reference/cat/cat-allocation.md +++ b/_api-reference/cat/cat-allocation.md @@ -21,7 +21,6 @@ api: cat.allocation component: endpoints --> ## Endpoints - ```json GET /_cat/allocation GET /_cat/allocation/{node_id} @@ -32,13 +31,14 @@ GET /_cat/allocation/{node_id} ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `bytes` | String | The units used to display byte values. | `cluster_manager_timeout` | String | A timeout for connection to the cluster manager node. | diff --git a/_api-reference/cat/cat-cluster_manager.md b/_api-reference/cat/cat-cluster_manager.md index 6081f949a3..39baf2a236 100644 --- a/_api-reference/cat/cat-cluster_manager.md +++ b/_api-reference/cat/cat-cluster_manager.md @@ -20,7 +20,6 @@ api: cat.cluster_manager component: endpoints --> ## Endpoints - ```json GET /_cat/cluster_manager ``` @@ -30,13 +29,14 @@ GET /_cat/cluster_manager ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `cluster_manager_timeout` | String | A timeout for connection to the cluster manager node. | `format` | String | A short version of the HTTP `Accept` header, such as `json` or `yaml`. | diff --git a/_api-reference/cat/cat-count.md b/_api-reference/cat/cat-count.md index 152977da30..85e9babb1b 100644 --- a/_api-reference/cat/cat-count.md +++ b/_api-reference/cat/cat-count.md @@ -21,7 +21,6 @@ api: cat.count component: endpoints --> ## Endpoints - ```json GET /_cat/count GET /_cat/count/{index} @@ -32,13 +31,14 @@ GET /_cat/count/{index} ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `format` | String | A short version of the `Accept` header, such as `json` or `yaml`. | `h` | List | A comma-separated list of column names to display. | diff --git a/_api-reference/cat/cat-field-data.md b/_api-reference/cat/cat-field-data.md index d01ef8ba3f..708ce2584f 100644 --- a/_api-reference/cat/cat-field-data.md +++ b/_api-reference/cat/cat-field-data.md @@ -19,7 +19,6 @@ api: cat.fielddata component: endpoints --> ## Endpoints - ```json GET /_cat/fielddata GET /_cat/fielddata/{fields} @@ -30,13 +29,14 @@ GET /_cat/fielddata/{fields} ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `bytes` | String | The units used to display byte values. | `format` | String | A short version of the `Accept` header, such as `json` or `yaml`. | diff --git a/_api-reference/cat/cat-health.md b/_api-reference/cat/cat-health.md index 841459742a..0268b6ac4b 100644 --- a/_api-reference/cat/cat-health.md +++ b/_api-reference/cat/cat-health.md @@ -20,7 +20,6 @@ api: cat.health component: endpoints --> ## Endpoints - ```json GET /_cat/health ``` @@ -30,13 +29,14 @@ GET /_cat/health ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `format` | String | A short version of the `Accept` header, such as `json` or `yaml`. | `h` | List | A comma-separated list of column names to display. | diff --git a/_api-reference/cat/cat-indices.md b/_api-reference/cat/cat-indices.md index 7aade8f959..2373dbe10c 100644 --- a/_api-reference/cat/cat-indices.md +++ b/_api-reference/cat/cat-indices.md @@ -20,7 +20,6 @@ api: cat.indices component: endpoints --> ## Endpoints - ```json GET /_cat/indices GET /_cat/indices/{index} @@ -31,13 +30,14 @@ GET /_cat/indices/{index} ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `bytes` | String | The units used to display byte values. | `cluster_manager_timeout` | String | The amount of time allowed to establish a connection to the cluster manager node. | diff --git a/_api-reference/cat/cat-nodeattrs.md b/_api-reference/cat/cat-nodeattrs.md index 229f77f8b6..04459050ef 100644 --- a/_api-reference/cat/cat-nodeattrs.md +++ b/_api-reference/cat/cat-nodeattrs.md @@ -20,7 +20,6 @@ api: cat.nodeattrs component: endpoints --> ## Endpoints - ```json GET /_cat/nodeattrs ``` @@ -30,13 +29,14 @@ GET /_cat/nodeattrs ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `cluster_manager_timeout` | String | The amount of time allowed to establish a connection to the cluster manager node. | `format` | String | A short version of the `Accept` header, such as `json` or `yaml`. | diff --git a/_api-reference/cat/cat-nodes.md b/_api-reference/cat/cat-nodes.md index 50e2dc6de2..3121071b58 100644 --- a/_api-reference/cat/cat-nodes.md +++ b/_api-reference/cat/cat-nodes.md @@ -22,7 +22,6 @@ api: cat.nodes component: endpoints --> ## Endpoints - ```json GET /_cat/nodes ``` @@ -32,13 +31,14 @@ GET /_cat/nodes ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `bytes` | String | The units used to display byte values. | `cluster_manager_timeout` | String | The amount of time allowed to establish a connection to the cluster manager node. | diff --git a/_api-reference/cat/cat-pending-tasks.md b/_api-reference/cat/cat-pending-tasks.md index 7a7222dcb1..15fa159531 100644 --- a/_api-reference/cat/cat-pending-tasks.md +++ b/_api-reference/cat/cat-pending-tasks.md @@ -20,7 +20,6 @@ api: cat.pending_tasks component: endpoints --> ## Endpoints - ```json GET /_cat/pending_tasks ``` @@ -30,13 +29,14 @@ GET /_cat/pending_tasks ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `cluster_manager_timeout` | String | The amount of time allowed to establish a connection to the cluster manager node. | `format` | String | A short version of the `Accept` header, such as `json` or `yaml`. | diff --git a/_api-reference/cat/cat-pit-segments.md b/_api-reference/cat/cat-pit-segments.md index a7a64e842e..76b46c03de 100644 --- a/_api-reference/cat/cat-pit-segments.md +++ b/_api-reference/cat/cat-pit-segments.md @@ -16,7 +16,6 @@ api: cat.pit_segments component: endpoints omit_header: true --> - ```json GET /_cat/pit_segments ``` @@ -27,7 +26,6 @@ api: cat.all_pit_segments component: endpoints omit_header: true --> - ```json GET /_cat/pit_segments/_all ``` @@ -36,13 +34,14 @@ GET /_cat/pit_segments/_all ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `bytes` | String | The units used to display byte values. | `format` | String | A short version of the `Accept` header, such as `json` or `yaml`. | diff --git a/_api-reference/cat/cat-plugins.md b/_api-reference/cat/cat-plugins.md index 012ed0dfd8..c931f72a52 100644 --- a/_api-reference/cat/cat-plugins.md +++ b/_api-reference/cat/cat-plugins.md @@ -19,7 +19,6 @@ api: cat.plugins component: endpoints --> ## Endpoints - ```json GET /_cat/plugins ``` @@ -29,13 +28,14 @@ GET /_cat/plugins ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `cluster_manager_timeout` | String | The amount of time allowed to establish a connection to the cluster manager node. | `format` | String | A short version of the `Accept` header, such as `json` or `yaml`. | diff --git a/_api-reference/cat/cat-recovery.md b/_api-reference/cat/cat-recovery.md index aab281d983..4326fb552e 100644 --- a/_api-reference/cat/cat-recovery.md +++ b/_api-reference/cat/cat-recovery.md @@ -20,7 +20,6 @@ api: cat.recovery component: endpoints --> ## Endpoints - ```json GET /_cat/recovery GET /_cat/recovery/{index} @@ -31,13 +30,14 @@ GET /_cat/recovery/{index} ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `active_only` | Boolean | If `true`, the response only includes ongoing shard recoveries. | `false` `bytes` | String | The units used to display byte values. | diff --git a/_api-reference/cat/cat-repositories.md b/_api-reference/cat/cat-repositories.md index c25235a4f4..00e8e49b97 100644 --- a/_api-reference/cat/cat-repositories.md +++ b/_api-reference/cat/cat-repositories.md @@ -19,7 +19,6 @@ api: cat.repositories component: endpoints --> ## Endpoints - ```json GET /_cat/repositories ``` @@ -29,13 +28,14 @@ GET /_cat/repositories ## Query parameters +The following table lists the available query parameters. All query parameters are optional. -Parameter | Type | Description | Default +Parameter | Data type | Description | Default :--- | :--- | :--- | :--- `cluster_manager_timeout` | String | The amount of time allowed to establish a connection to the cluster manager node. | `format` | String | A short version of the `Accept` header, such as `json` or `yaml`. | diff --git a/_api-reference/cat/cat-segment-replication.md b/_api-reference/cat/cat-segment-replication.md index 74235e881c..025d2b2c29 100644 --- a/_api-reference/cat/cat-segment-replication.md +++ b/_api-reference/cat/cat-segment-replication.md @@ -44,7 +44,7 @@ Parameter | Type | Description ## Query parameters diff --git a/_api-reference/cat/cat-segments.md b/_api-reference/cat/cat-segments.md index 3e1415e063..620e133eb5 100644 --- a/_api-reference/cat/cat-segments.md +++ b/_api-reference/cat/cat-segments.md @@ -31,7 +31,7 @@ GET /_cat/segments/{index} ## Query parameters diff --git a/_api-reference/cat/cat-shards.md b/_api-reference/cat/cat-shards.md index ef270ee999..ce47c9f29e 100644 --- a/_api-reference/cat/cat-shards.md +++ b/_api-reference/cat/cat-shards.md @@ -31,7 +31,7 @@ GET /_cat/shards/{index} ## Query parameters diff --git a/_api-reference/cat/cat-snapshots.md b/_api-reference/cat/cat-snapshots.md index 9aa16f2916..1b061bc4d3 100644 --- a/_api-reference/cat/cat-snapshots.md +++ b/_api-reference/cat/cat-snapshots.md @@ -31,7 +31,7 @@ GET /_cat/snapshots/{repository} ## Query parameters diff --git a/_api-reference/cat/cat-tasks.md b/_api-reference/cat/cat-tasks.md index 1b67e9cdc2..02e10105f3 100644 --- a/_api-reference/cat/cat-tasks.md +++ b/_api-reference/cat/cat-tasks.md @@ -29,7 +29,7 @@ GET /_cat/tasks ## Query parameters diff --git a/_api-reference/cat/cat-templates.md b/_api-reference/cat/cat-templates.md index b9d4a58e0a..7bb361f3f2 100644 --- a/_api-reference/cat/cat-templates.md +++ b/_api-reference/cat/cat-templates.md @@ -31,7 +31,7 @@ GET /_cat/templates/{name} ## Query parameters diff --git a/_api-reference/cat/cat-thread-pool.md b/_api-reference/cat/cat-thread-pool.md index 82d49e5126..9c82e283a6 100644 --- a/_api-reference/cat/cat-thread-pool.md +++ b/_api-reference/cat/cat-thread-pool.md @@ -31,7 +31,7 @@ GET /_cat/thread_pool/{thread_pool_patterns} ## Query parameters diff --git a/spec-insert/lib/renderers/templates/endpoints.mustache b/spec-insert/lib/renderers/templates/endpoints.mustache index 83fc7db1ec..0541921aa8 100644 --- a/spec-insert/lib/renderers/templates/endpoints.mustache +++ b/spec-insert/lib/renderers/templates/endpoints.mustache @@ -1,7 +1,6 @@ {{^omit_header}} ## Endpoints {{/omit_header}} - ```json {{#operations}} {{{verb}}} {{{path}}} diff --git a/spec-insert/lib/renderers/templates/path_parameters.mustache b/spec-insert/lib/renderers/templates/path_parameters.mustache index e6700217d1..ad69f4d589 100644 --- a/spec-insert/lib/renderers/templates/path_parameters.mustache +++ b/spec-insert/lib/renderers/templates/path_parameters.mustache @@ -4,5 +4,4 @@ The following table lists the available path parameters.{{#optional}} All path parameters are optional.{{/optional}} {{/omit_header}} - {{{table}}} \ No newline at end of file diff --git a/spec-insert/lib/renderers/templates/query_parameters.mustache b/spec-insert/lib/renderers/templates/query_parameters.mustache index 96baaf0be3..5cc7bc9241 100644 --- a/spec-insert/lib/renderers/templates/query_parameters.mustache +++ b/spec-insert/lib/renderers/templates/query_parameters.mustache @@ -4,5 +4,4 @@ The following table lists the available query parameters.{{#optional}} All query parameters are optional.{{/optional}} {{/omit_header}} - {{{table}}} \ No newline at end of file diff --git a/spec-insert/spec/_fixtures/expected_output/endpoints.md b/spec-insert/spec/_fixtures/expected_output/endpoints.md index 32768d8f4a..cffad018cb 100644 --- a/spec-insert/spec/_fixtures/expected_output/endpoints.md +++ b/spec-insert/spec/_fixtures/expected_output/endpoints.md @@ -4,12 +4,10 @@ api: search component: endpoints --> ## Endpoints - ```json GET /_search POST /_search GET /{index}/_search POST /{index}/_search ``` - diff --git a/spec-insert/spec/_fixtures/expected_output/param_tables.md b/spec-insert/spec/_fixtures/expected_output/param_tables.md index f182f132f0..203ddf722c 100644 --- a/spec-insert/spec/_fixtures/expected_output/param_tables.md +++ b/spec-insert/spec/_fixtures/expected_output/param_tables.md @@ -24,7 +24,6 @@ columns: Data type, Parameter, Description, Required, Default --> ## Query parameters - The following table lists the available query parameters. | Data type | Parameter | Description | Required | Default |