Skip to content

Commit 49302cf

Browse files
authored
rest-api-spec: use list type in parts when appropriate (elastic#137568) (elastic#138154)
* rest-api-spec: use list type in parts when appropriate Many APIs accept comma-separated values in the path, which is encoded by using the `list` type. * Mention comma-separated list in descriptions
1 parent 2dd0781 commit 49302cf

30 files changed

+60
-60
lines changed

rest-api-spec/src/main/resources/rest-api-spec/api/cluster.delete_component_template.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
],
2121
"parts": {
2222
"name": {
23-
"type": "string",
24-
"description": "The name of the template"
23+
"type": "list",
24+
"description": "Comma-separated list or wildcard expression of component template names used to limit the request."
2525
}
2626
}
2727
}

rest-api-spec/src/main/resources/rest-api-spec/api/cluster.exists_component_template.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
],
2121
"parts": {
2222
"name": {
23-
"type": "string",
24-
"description": "The name of the template"
23+
"type": "list",
24+
"description": "Comma-separated list of component template names used to limit the request. Wildcard (*) expressions are supported."
2525
}
2626
}
2727
}

rest-api-spec/src/main/resources/rest-api-spec/api/eql.search.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
],
2525
"parts": {
2626
"index": {
27-
"type": "string",
28-
"description": "The name of the index to scope the operation"
27+
"type": "list",
28+
"description": "Comma-separated list of index names to scope the operation"
2929
}
3030
}
3131
}

rest-api-spec/src/main/resources/rest-api-spec/api/health_report.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
],
2727
"parts": {
2828
"feature": {
29-
"type": "string",
30-
"description": "A feature of the cluster, as returned by the top-level health API"
29+
"type": "list",
30+
"description": "Comma-separated list of cluster features, as returned by the top-level health report API."
3131
}
3232
}
3333
}

rest-api-spec/src/main/resources/rest-api-spec/api/indices.cancel_migrate_reindex.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
],
2424
"parts": {
2525
"index": {
26-
"type": "string",
27-
"description": "The index or data stream name"
26+
"type": "list",
27+
"description": "Comma-separated list of index or data stream names"
2828
}
2929
}
3030
}

rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_index_template.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
],
2121
"parts": {
2222
"name": {
23-
"type": "string",
24-
"description": "The name of the template"
23+
"type": "list",
24+
"description": "Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported."
2525
}
2626
}
2727
}

rest-api-spec/src/main/resources/rest-api-spec/api/indices.disk_usage.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
],
2121
"parts": {
2222
"index": {
23-
"type": "string",
24-
"description": "Comma-separated list of indices or data streams to analyze the disk usage"
23+
"type": "list",
24+
"description": "Comma-separated list of data streams, indices, and aliases used to limit the request. It\u2019s recommended to execute this API with a single index (or the latest backing index of a data stream) as the API consumes resources significantly."
2525
}
2626
}
2727
}

rest-api-spec/src/main/resources/rest-api-spec/api/indices.explain_data_lifecycle.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
],
2121
"parts": {
2222
"index": {
23-
"type": "string",
24-
"description": "The name of the index to explain"
23+
"type": "list",
24+
"description": "Comma-separated list of index names to explain"
2525
}
2626
}
2727
}

rest-api-spec/src/main/resources/rest-api-spec/api/indices.field_usage_stats.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
],
2121
"parts": {
2222
"index": {
23-
"type": "string",
24-
"description": "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
23+
"type": "list",
24+
"description": "Comma-separated list or wildcard expression of index names used to limit the request."
2525
}
2626
}
2727
}

rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream_mappings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
],
2121
"parts": {
2222
"name": {
23-
"type": "string",
24-
"description": "Comma-separated list of data streams or data stream patterns"
23+
"type": "list",
24+
"description": "A comma-separated list of data streams or data stream patterns. Supports wildcards (`*`)."
2525
}
2626
}
2727
}

0 commit comments

Comments
 (0)