Skip to content

Commit 41f2f0a

Browse files
authored
[DOCS] Add overlays for CCR API examples (#3672)
1 parent 94e5ff9 commit 41f2f0a

28 files changed

+491
-125
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 75 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,74 @@ actions:
199199
examples:
200200
resumeFollowIndexResponseExample1:
201201
$ref: "../../specification/ccr/resume_follow/examples/response/ResumeFollowIndexResponseExample1.yaml"
202+
- target: "$.paths['/{index}/_ccr/unfollow']['post']"
203+
description: "Add examples for unfollow an index"
204+
update:
205+
responses:
206+
200:
207+
content:
208+
application/json:
209+
examples:
210+
ccrUnfollowIndexResponseExample1:
211+
$ref: "../../specification/ccr/unfollow/examples/response/UnfollowIndexResponseExample1.yaml"
212+
- target: "$.paths['/_ccr/stats']['get']"
213+
description: "Add examples for get ccr stats"
214+
update:
215+
responses:
216+
200:
217+
content:
218+
application/json:
219+
examples:
220+
ccrStatsResponseExample1:
221+
$ref: "../../specification/ccr/stats/examples/response/CcrStatsResponseExample1.yaml"
222+
- target: "$.paths['/_ccr/auto_follow/{name}/resume']['post']"
223+
description: "Add examples for resume auto-follow pattern"
224+
update:
225+
responses:
226+
200:
227+
content:
228+
application/json:
229+
examples:
230+
ccrResumeAutoFollowResponseExample1:
231+
$ref: "../../specification/ccr/resume_auto_follow_pattern/examples/response/ResumeAutoFollowPatternResponseExample1.yaml"
232+
- target: "$.paths['/{index}/_ccr/pause_follow']['post']"
233+
description: "Add examples for resume auto-follow pattern"
234+
update:
235+
responses:
236+
200:
237+
content:
238+
application/json:
239+
examples:
240+
ccrPauseFollowResponseExample1:
241+
$ref: "../../specification/ccr/pause_follow/examples/response/PauseFollowIndexResponseExample1.yaml"
242+
- target: "$.paths['/_ccr/auto_follow/{name}/pause']['post']"
243+
description: "Add examples for pause auto-follow pattern"
244+
update:
245+
responses:
246+
200:
247+
content:
248+
application/json:
249+
examples:
250+
ccrPauseAutoFollowPatternResponseExample1:
251+
$ref: "../../specification/ccr/pause_auto_follow_pattern/examples/response/PauseAutoFollowPatternResponseExample1.yaml"
252+
- target: "$.components['responses']['ccr.get_auto_follow_pattern#200']"
253+
description: "Add examples for get auto-follow pattern"
254+
update:
255+
content:
256+
application/json:
257+
examples:
258+
ccrPauseAutoFollowPatternResponseExample1:
259+
$ref: "../../specification/ccr/get_auto_follow_pattern/examples/response/GetAutoFollowPatternResponseExample1.yaml"
260+
- target: "$.paths['/{index}/_ccr/stats']['get']"
261+
description: "Add examples for get follower stats"
262+
update:
263+
responses:
264+
200:
265+
content:
266+
application/json:
267+
examples:
268+
ccrFollowerStatsResponseExample1:
269+
$ref: "../../specification/ccr/follow_stats/examples/response/FollowIndexStatsResponseExample1.yaml"
202270
## Examples for cluster
203271
- target: "$.components['requestBodies']['cluster.allocation_explain']"
204272
description: "Add examples for cluster allocation explain operation"
@@ -496,14 +564,13 @@ actions:
496564
- target: "$.components['responses']['indices.resolve_cluster#200']"
497565
description: "Add examples for resolve cluster operation"
498566
update:
499-
responses:
500-
content:
501-
application/json:
502-
examples:
503-
resolveClusterResponseExample1:
504-
$ref: "../../specification/indices/resolve_cluster/examples/200_response/ResolveClusterResponseExample1.yaml"
505-
resolveClusterResponseExample2:
506-
$ref: "../../specification/indices/resolve_cluster/examples/200_response/ResolveClusterResponseExample2.yaml"
567+
content:
568+
application/json:
569+
examples:
570+
resolveClusterResponseExample1:
571+
$ref: "../../specification/indices/resolve_cluster/examples/200_response/ResolveClusterResponseExample1.yaml"
572+
resolveClusterResponseExample2:
573+
$ref: "../../specification/indices/resolve_cluster/examples/200_response/ResolveClusterResponseExample2.yaml"
507574
- target: "$.components['requestBodies']['indices.shrink']"
508575
description: "Add example for shrink index request"
509576
update:

output/openapi/elasticsearch-openapi.json

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

0 commit comments

Comments
 (0)