Skip to content

Commit ce870d4

Browse files
Convert examples to yaml and add subfolders (#3458) (#3471)
(cherry picked from commit b457ca0) Co-authored-by: Lisa Cawley <[email protected]>
1 parent 3079a67 commit ce870d4

File tree

127 files changed

+1147
-1086
lines changed

Some content is hidden

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

127 files changed

+1147
-1086
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ actions:
7171
application/json:
7272
examples:
7373
getFeaturesResponseExample1:
74-
$ref: "../../specification/features/get_features/FeaturesApiResponseExample1.json"
74+
$ref: "../../specification/features/get_features/examples/response/GetFeaturesResponseExample1.yaml"
7575
- target: "$.paths['/_features/_reset']['post']"
7676
description: "Add examples for reset features operation"
7777
update:
@@ -81,23 +81,23 @@ actions:
8181
application/json:
8282
examples:
8383
resetFeaturesResponseExample1:
84-
$ref: "../../specification/features/reset_features/ResetFeaturesResponseExample1.json"
84+
$ref: "../../specification/features/reset_features/examples/response/ResetFeaturesResponseExample1.yaml"
8585
- target: "$.components['requestBodies']['cluster.allocation_explain']"
8686
description: "Add examples for cluster allocation explain operation"
8787
update:
8888
content:
8989
application/json:
9090
examples:
9191
clusterAllocationExplainRequestExample1:
92-
$ref: "../../specification/cluster/allocation_explain/clusterAllocationExplainRequestExample1.json"
92+
$ref: "../../specification/cluster/allocation_explain/examples/request/clusterAllocationExplainRequestExample1.yaml"
9393
- target: "$.components['responses']['cluster.health#200']"
9494
description: "Add examples for cluster health operation"
9595
update:
9696
content:
9797
application/json:
9898
examples:
9999
clusterHealthResponseExample1:
100-
$ref: "../../specification/cluster/health/clusterHealthResponseExample1.json"
100+
$ref: "../../specification/cluster/health/examples/response/clusterHealthResponseExample1.yaml"
101101
- target: "$.paths['/_cluster/settings']['put']"
102102
description: "Add examples for cluster update settings operation"
103103
update:
@@ -106,7 +106,7 @@ actions:
106106
application/json:
107107
examples:
108108
clusterPutSettingsRequestExample1:
109-
$ref: "../../specification/cluster/put_settings/clusterPutSettingsRequestExample1.json"
109+
$ref: "../../specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml"
110110
- target: "$.paths['/_cluster/reroute']['post']"
111111
description: "Add examples for cluster reroute operation"
112112
update:
@@ -115,23 +115,23 @@ actions:
115115
application/json:
116116
examples:
117117
clusterRerouteRequestExample1:
118-
$ref: "../../specification/cluster/reroute/clusterRerouteRequestExample1.json"
118+
$ref: "../../specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml"
119119
- target: "$.components['requestBodies']['nodes.reload_secure_settings']"
120120
description: "Add examples for nodes reload secure settings operation"
121121
update:
122122
content:
123123
application/json:
124124
examples:
125125
clusterNodesReloadSecureSettingsRequestExample1:
126-
$ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsRequestExample1.json"
126+
$ref: "../../specification/nodes/reload_secure_settings/examples/request/ReloadSecureSettingsRequestExample1.yaml"
127127
- target: "$.components['responses']['nodes.reload_secure_settings#200']"
128128
description: "Add response examples for nodes reload secure settings operation"
129129
update:
130130
content:
131131
application/json:
132132
examples:
133133
clusterNodesReloadSecureSettingsResponseExample1:
134-
$ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsResponseExample1.json"
134+
$ref: "../../specification/nodes/reload_secure_settings/examples/response/ReloadSecureSettingsResponseExample1.yaml"
135135
- target: "$.paths['/_tasks']['get']"
136136
description: "Add examples for task management operation"
137137
update:
@@ -141,7 +141,7 @@ actions:
141141
application/json:
142142
examples:
143143
getTasksResponseExample1:
144-
$ref: "../../specification/tasks/get/getTasksResponseExample1.json"
144+
$ref: "../../specification/tasks/get/examples/response/GetTaskResponseExample1.yaml"
145145
- target: "$.components['responses']['nodes.info#200']"
146146
description: "Add response examples for nodes info"
147147
update:
@@ -159,7 +159,7 @@ actions:
159159
application/json:
160160
examples:
161161
deleteLifecycleResponseExample1:
162-
$ref: "../../specification/ilm/delete_lifecycle/DeleteLifecycleResponseExample1.json"
162+
$ref: "../../specification/ilm/delete_lifecycle/examples/response/DeleteLifecycleResponseExample1.yaml"
163163
- target: "$.paths['/_ilm/policy/{policy}']['put']"
164164
description: "Add examples for create a lifecycle operation"
165165
update:
@@ -168,22 +168,22 @@ actions:
168168
application/json:
169169
examples:
170170
putLifecycleRequestExample1:
171-
$ref: "../../specification/ilm/put_lifecycle/PutLifecycleRequestExample1.json"
171+
$ref: "../../specification/ilm/put_lifecycle/examples/request/PutLifecycleRequestExample1.yaml"
172172
responses:
173173
200:
174174
content:
175175
application/json:
176176
examples:
177177
putLifecycleResponseExample1:
178-
$ref: "../../specification/ilm/put_lifecycle/PutLifecycleResponseExample1.json"
178+
$ref: "../../specification/ilm/put_lifecycle/examples/response/PutLifecycleResponseExample1.yaml"
179179
- target: "$.components['responses']['ilm.get_lifecycle#200']"
180180
description: "Add examples for get lifecycle policy operation"
181181
update:
182182
content:
183183
application/json:
184184
examples:
185185
getLifecycleResponseExample1:
186-
$ref: "../../specification/ilm/get_lifecycle/GetLifecycleResponseExample1.json"
186+
$ref: "../../specification/ilm/get_lifecycle/examples/response/GetLifecycleResponseExample1.yaml"
187187
- target: "$.paths['/_ilm/migrate_to_data_tiers']['post']"
188188
description: "Add examples for migrate to data tiers routing operation"
189189
update:
@@ -192,14 +192,14 @@ actions:
192192
application/json:
193193
examples:
194194
migrateToDataTiersRequestExample1:
195-
$ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersRequestExample1.json"
195+
$ref: "../../specification/ilm/migrate_to_data_tiers/examples/request/RequestExample1.yaml"
196196
responses:
197197
200:
198198
content:
199199
application/json:
200200
examples:
201201
migrateToDataTiersResponseExample1:
202-
$ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersResponseExample1.json"
202+
$ref: "../../specification/ilm/migrate_to_data_tiers/examples/response/ResponseExample1.yaml"
203203
- target: "$.paths['/_ilm/move/{index}']['post']"
204204
description: "Add examples for move to lifecycle step operation"
205205
update:
@@ -208,14 +208,16 @@ actions:
208208
application/json:
209209
examples:
210210
moveToStepRequestExample1:
211-
$ref: "../../specification/ilm/move_to_step/MoveToStepRequestExample1.json"
211+
$ref: "../../specification/ilm/move_to_step/examples/request/MoveToStepRequestExample1.yaml"
212+
moveToStepRequestExample2:
213+
$ref: "../../specification/ilm/move_to_step/examples/request/MoveToStepRequestExample2.yaml"
212214
responses:
213215
200:
214216
content:
215217
application/json:
216218
examples:
217219
moveToStepResponseExample1:
218-
$ref: "../../specification/ilm/move_to_step/MoveToStepResponseExample1.json"
220+
$ref: "../../specification/ilm/move_to_step/examples/response/MoveToStepResponseExample1.yaml"
219221
- target: "$.paths['/_ilm/start']['post']"
220222
description: "Add examples for start index lifecycle management operation"
221223
update:
@@ -225,7 +227,7 @@ actions:
225227
application/json:
226228
examples:
227229
startILMResponseExample1:
228-
$ref: "../../specification/ilm/start/StartILMResponseExample1.json"
230+
$ref: "../../specification/ilm/start/examples/response/StartILMResponseExample1.yaml"
229231
- target: "$.paths['/_ilm/stop']['post']"
230232
description: "Add examples for stop index lifecycle management operation"
231233
update:
@@ -235,7 +237,7 @@ actions:
235237
application/json:
236238
examples:
237239
stopILMResponseExample1:
238-
$ref: "../../specification/ilm/stop/stopILMResponseExample1.json"
240+
$ref: "../../specification/ilm/stop/examples/response/StopILMResponseExample1.yaml"
239241
- target: "$.paths['/_ilm/status']['get']"
240242
description: "Add examples for get index lifecycle management status operation"
241243
update:
@@ -245,7 +247,7 @@ actions:
245247
application/json:
246248
examples:
247249
getILMStatusResponseExample1:
248-
$ref: "../../specification/ilm/get_status/GetILMStatusResponseExample1.json"
250+
$ref: "../../specification/ilm/get_status/examples/response/GetILMStatusResponseExample1.yaml"
249251
- target: "$.paths['/{index}/_ilm/explain']['get']"
250252
description: "Add examples for explain lifecycle operation"
251253
update:
@@ -255,7 +257,7 @@ actions:
255257
application/json:
256258
examples:
257259
explainLifecycleResponseExample1:
258-
$ref: "../../specification/ilm/explain_lifecycle/ExplainLifecycleResponseExample1.json"
260+
$ref: "../../specification/ilm/explain_lifecycle/examples/response/ExplainLifecycleResponseExample1.yaml"
259261
- target: "$.paths['/{index}/_ilm/remove']['post']"
260262
description: "Add examples for remove policy from index operation"
261263
update:
@@ -265,7 +267,7 @@ actions:
265267
application/json:
266268
examples:
267269
removePolicyResponseExample1:
268-
$ref: "../../specification/ilm/remove_policy/RemovePolicyResponseExample1.json"
270+
$ref: "../../specification/ilm/remove_policy/examples/response/RemovePolicyResponseExample1.yaml"
269271
- target: "$.components['requestBodies']['indices.clone']"
270272
description: "Add examples for clone index request"
271273
update:
@@ -283,7 +285,7 @@ actions:
283285
application/json:
284286
examples:
285287
indicesCloseResponseExample1:
286-
$ref: "../../specification/indices/close/indicesCloseResponseExample1.yaml"
288+
$ref: "../../specification/indices/close/examples/response/CloseIndexResponseExample1.yaml"
287289
- target: "$.components['responses']['indices.data_streams_stats#200']"
288290
description: "Add example for data stream stats response"
289291
update:

docs/overlays/elasticsearch-shared-overlays.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,15 +1077,15 @@ actions:
10771077
application/json:
10781078
examples:
10791079
asyncSearchSubmitRequestExample1:
1080-
$ref: "../../specification/async_search/submit/AsyncSearchSubmitRequestExample1.json"
1080+
$ref: "../../specification/async_search/submit/examples/request/AsyncSearchSubmitRequestExample1.yaml"
10811081
- target: "$.components['responses']['async_search.submit#200']"
10821082
description: "Add example for asynch search submit response"
10831083
update:
10841084
content:
10851085
application/json:
10861086
examples:
10871087
asyncSearchSubmitResponseExample1:
1088-
$ref: "../../specification/async_search/submit/AsyncSearchSubmitResponseExample1.json"
1088+
$ref: "../../specification/async_search/submit/examples/response/AsyncSearchSubmitResponseExample1.yaml"
10891089
- target: "$.paths['/_transform/{transform_id}']['put']"
10901090
description: "Add examples for create transform operation"
10911091
update:
@@ -1094,32 +1094,32 @@ actions:
10941094
application/json:
10951095
examples:
10961096
createTransformRequestExample1:
1097-
$ref: "../../specification/transform/put_transform/PutTransformRequestExample1.json"
1097+
$ref: "../../specification/transform/put_transform/examples/request/PutTransformRequestExample1.yaml"
10981098
createTransformRequestExample2:
1099-
$ref: "../../specification/transform/put_transform/PutTransformRequestExample2.json"
1099+
$ref: "../../specification/transform/put_transform/examples/request/PutTransformRequestExample2.yaml"
11001100
responses:
11011101
200:
11021102
content:
11031103
application/json:
11041104
examples:
11051105
createTransformResponseExample1:
1106-
$ref: "../../specification/transform/put_transform/PutTransformResponseExample1.json"
1106+
$ref: "../../specification/transform/put_transform/examples/response/PutTransformResponseExample1.yaml"
11071107
- target: "$.components['requestBodies']['transform.preview_transform']"
11081108
description: "Add examples for preview transform operation"
11091109
update:
11101110
content:
11111111
application/json:
11121112
examples:
11131113
previewTransformRequestExample1:
1114-
$ref: "../../specification/transform/preview_transform/PreviewTransformRequestExample1.json"
1114+
$ref: "../../specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.yaml"
11151115
- target: "$.components['responses']['transform.preview_transform#200']"
11161116
description: "Add examples for preview transform operation"
11171117
update:
11181118
content:
11191119
application/json:
11201120
examples:
11211121
previewTransformResponseExample1:
1122-
$ref: "../../specification/transform/preview_transform/PreviewTransformResponseExample1.json"
1122+
$ref: "../../specification/transform/preview_transform/examples/response/PreviewTransformResponseExample1.yaml"
11231123
- target: "$.paths['/_transform/{transform_id}/_update']['post']"
11241124
description: "Add examples for update transform operation"
11251125
update:
@@ -1128,14 +1128,14 @@ actions:
11281128
application/json:
11291129
examples:
11301130
updateTransformRequestExample1:
1131-
$ref: "../../specification/transform/update_transform/UpdateTransformRequestExample1.json"
1131+
$ref: "../../specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.yaml"
11321132
responses:
11331133
200:
11341134
content:
11351135
application/json:
11361136
examples:
11371137
updateTransformResponseExample1:
1138-
$ref: "../../specification/transform/update_transform/UpdateTransformResponseExample1.json"
1138+
$ref: "../../specification/transform/update_transform/examples/response/UpdateTransformResponseExample1.yaml"
11391139
- target: "$.paths['/_eql/search/status/{id}']['get']"
11401140
description: "Add examples for get async EQL status operation"
11411141
update:
@@ -1145,25 +1145,25 @@ actions:
11451145
application/json:
11461146
examples:
11471147
eqlGetStatusResponseExample1:
1148-
$ref: "../../specification/eql/get_status/EqlGetStatusResponseExample1.json"
1148+
$ref: "../../specification/eql/get_status/examples/response/EqlGetStatusResponseExample1.yaml"
11491149
- target: "$.components['requestBodies']['eql.search']"
11501150
description: "Add examples for EQL search operation"
11511151
update:
11521152
content:
11531153
application/json:
11541154
examples:
11551155
eqlSearchRequestExample1:
1156-
$ref: "../../specification/eql/search/EqlSearchRequestExample1.json"
1156+
$ref: "../../specification/eql/search/examples/request/EqlSearchRequestExample1.yaml"
11571157
eqlSearchRequestExample2:
1158-
$ref: "../../specification/eql/search/EqlSearchRequestExample2.json"
1158+
$ref: "../../specification/eql/search/examples/request/EqlSearchRequestExample2.yaml"
11591159
- target: "$.components['reponses']['eql.search#200']"
11601160
description: "Add examples for EQL search operation"
11611161
update:
11621162
content:
11631163
application/json:
11641164
examples:
11651165
eqlSearchResponseExample2:
1166-
$ref: "../../specification/eql/search/EqlSearchResponseExample2.json"
1166+
$ref: "../../specification/eql/search/examples/response/EqlSearchResponseExample2.yaml"
11671167
- target: "$.paths['/_query']['post']"
11681168
description: "Add examples for ES|QL query operation"
11691169
update:
@@ -1172,15 +1172,15 @@ actions:
11721172
application/json:
11731173
examples:
11741174
esqlQueryRequestExample1:
1175-
$ref: "../../specification/esql/query/EsqlQueryApiRequestExample1.json"
1175+
$ref: "../../specification/esql/query/examples/request/QueryRequestExample1.yaml"
11761176
- target: "$.components['requestBodies']['graph.explore']"
11771177
description: "Add example for graph explore request"
11781178
update:
11791179
content:
11801180
application/json:
11811181
examples:
11821182
graphExploreRequestExample1:
1183-
$ref: "../../specification/graph/explore/graphExploreRequestExample1.json"
1183+
$ref: "../../specification/graph/explore/examples/request/GraphExploreRequestExample1.yaml"
11841184
- target: "$.paths['/{index}/_block/{block}']['put']"
11851185
description: "Add examples for add index block operation"
11861186
update:
@@ -1334,7 +1334,7 @@ actions:
13341334
application/json:
13351335
examples:
13361336
indicesResolveResponseExample1:
1337-
$ref: "../../specification/indices/resolve_index/ResolveIndexResponseExample1.yaml"
1337+
$ref: "../../specification/indices/resolve_index/examples/response/ResolveIndexResponseExample1.yaml"
13381338
- target: "$.components['requestBodies']['indices.rollover']"
13391339
description: "Add example for rollover index request"
13401340
update:

output/openapi/elasticsearch-openapi.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)