Skip to content

Commit edd5ba9

Browse files
authored
rest-api-spec: Enforce body "required" field (#136356) (#136369)
* rest-api-spec: Enforce body "required" field * Fix required status after YAML test run
1 parent 0a9a00b commit edd5ba9

File tree

77 files changed

+154
-77
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+154
-77
lines changed

rest-api-spec/src/main/resources/rest-api-spec/api/async_search.submit.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@
247247
}
248248
},
249249
"body": {
250-
"description": "The search definition using the Query DSL"
250+
"description": "The search definition using the Query DSL",
251+
"required": false
251252
}
252253
}
253254
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
},
4545
"params": {},
4646
"body": {
47-
"description": "A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter"
47+
"description": "A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter",
48+
"required": false
4849
}
4950
}
5051
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
},
2727
"params": {},
2828
"body": {
29-
"description": "a point-in-time id to close"
29+
"description": "a point-in-time id to close",
30+
"required": true
3031
}
3132
}
3233
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@
5959
}
6060
},
6161
"body": {
62-
"description": "The index, shard, and primary flag to explain. Empty means 'explain a randomly-chosen unassigned shard'"
62+
"description": "The index, shard, and primary flag to explain. Empty means 'explain a randomly-chosen unassigned shard'",
63+
"required": false
6364
}
6465
}
6566
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@
6767
}
6868
},
6969
"body": {
70-
"description": "The definition of `commands` to perform (`move`, `cancel`, `allocate`)"
70+
"description": "The definition of `commands` to perform (`move`, `cancel`, `allocate`)",
71+
"required": false
7172
}
7273
}
7374
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@
119119
}
120120
},
121121
"body": {
122-
"description": "A query to restrict the results specified with the Query DSL (optional)"
122+
"description": "A query to restrict the results specified with the Query DSL (optional)",
123+
"required": false
123124
}
124125
}
125126
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@
9393
}
9494
},
9595
"body": {
96-
"description": "The query definition using the Query DSL"
96+
"description": "The query definition using the Query DSL",
97+
"required": false
9798
}
9899
}
99100
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@
8989
}
9090
},
9191
"body": {
92-
"description": "An index filter specified with the Query DSL"
92+
"description": "An index filter specified with the Query DSL",
93+
"required": false
9394
}
9495
}
9596
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
}
4949
},
5050
"body": {
51-
"description": "The search definition using the Query DSL"
51+
"description": "The search definition using the Query DSL",
52+
"required": true
5253
}
5354
}
5455
}

rest-api-spec/src/main/resources/rest-api-spec/api/graph.explore.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
}
4343
},
4444
"body": {
45-
"description": "Graph Query DSL"
45+
"description": "Graph Query DSL",
46+
"required": true
4647
}
4748
}
4849
}

0 commit comments

Comments
 (0)