Skip to content

Commit 4c00a02

Browse files
authored
metric on watcher stats is a list not an enum (#39114)
`enum` is a single option from a known list of `options` `list` is an array of unknown values `flags` are multiple options from a list of known `options`. We don't support the `flags` type but a `list` with `options` acts as one. This is already the case for other API's taking metric such as `node.stats.json`. watcher.stats behaves the same as other API's as `metrics` and as such accepts the following `GET _xpack/watcher/stats/queued_watches,current_watches`
1 parent e0f728b commit 4c00a02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.stats.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
"paths": [ "/_watcher/stats", "/_watcher/stats/{metric}" ],
88
"parts": {
99
"metric": {
10-
"type" : "enum",
10+
"type" : "list",
1111
"options" : ["_all", "queued_watches", "current_watches", "pending_watches"],
1212
"description" : "Controls what additional stat metrics should be include in the response"
1313
}
1414
},
1515
"params": {
1616
"metric": {
17-
"type" : "enum",
17+
"type" : "list",
1818
"options" : ["_all", "queued_watches", "current_watches", "pending_watches"],
1919
"description" : "Controls what additional stat metrics should be include in the response"
2020
},

0 commit comments

Comments
 (0)