Skip to content

Commit 354862c

Browse files
olcbeanjavanna
authored andcommitted
Set request body to required to reflect the code base (elastic#27188)
Update API, Cluster Update Settings API and Put Index Template API didn't have the request body set to required in their spec, hence this commit updates the spec to align them with reality.
1 parent b71f7d3 commit 354862c

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
}
2323
},
2424
"body": {
25-
"description": "The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart)."
25+
"description": "The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart).",
26+
"required" : true
2627
}
2728
}
2829
}

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"paths": ["/_search/template", "/{index}/_search/template", "/{index}/{type}/_search/template"],
88
"parts": {
99
"index": {
10-
"type" : "list",
11-
"description" : "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
10+
"type" : "list",
11+
"description" : "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
1212
},
1313
"type": {
1414
"type" : "list",
@@ -17,18 +17,18 @@
1717
},
1818
"params" : {
1919
"ignore_unavailable": {
20-
"type" : "boolean",
21-
"description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
20+
"type" : "boolean",
21+
"description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
2222
},
2323
"allow_no_indices": {
24-
"type" : "boolean",
25-
"description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
24+
"type" : "boolean",
25+
"description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
2626
},
2727
"expand_wildcards": {
28-
"type" : "enum",
29-
"options" : ["open","closed","none","all"],
30-
"default" : "open",
31-
"description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
28+
"type" : "enum",
29+
"options" : ["open","closed","none","all"],
30+
"default" : "open",
31+
"description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
3232
},
3333
"preference": {
3434
"type" : "string",
@@ -62,7 +62,8 @@
6262
}
6363
},
6464
"body": {
65-
"description": "The search definition template and its params"
65+
"description": "The search definition template and its params",
66+
"required" : true
6667
}
6768
}
6869
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
}
8989
},
9090
"body": {
91-
"description": "The request definition using either `script` or partial `doc`"
91+
"description": "The request definition requires either `script` or partial `doc`",
92+
"required": true
9293
}
9394
}
9495
}

0 commit comments

Comments
 (0)