Skip to content

Commit

Permalink
[DOCS] Add overlays for examples inapplicable to serverless (#3635)
Browse files Browse the repository at this point in the history
(cherry picked from commit 38fde2b)
  • Loading branch information
lcawl authored and github-actions[bot] committed Jan 28, 2025
1 parent e1ce1c7 commit bd697b5
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 113 deletions.
293 changes: 187 additions & 106 deletions docs/overlays/elasticsearch-openapi-overlays.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,139 @@ actions:
- basicAuth: []
- bearerAuth: []
# Examples that apply only to the Elasticsearch OpenAPI document
- target: "$.paths['/_features']['get']"
description: "Add examples for get features operation"
## Examples for autoscaling
- target: "$.paths['/_autoscaling/policy/{name}']['delete']"
description: "Add examples for delete autoscaling policy response"
update:
responses:
200:
content:
application/json:
examples:
getFeaturesResponseExample1:
$ref: "../../specification/features/get_features/examples/response/GetFeaturesResponseExample1.yaml"
- target: "$.paths['/_features/_reset']['post']"
description: "Add examples for reset features operation"
deleteAutoscalingPolicyResponseExample1:
$ref: "../../specification/autoscaling/delete_autoscaling_policy/examples/response/DeleteAutoscalingPolicyResponseExample1.yaml"
- target: "$.paths['/_autoscaling/capacity']['get']"
description: "Add examples for get autoscaling capacity response"
update:
responses:
200:
content:
application/json:
examples:
resetFeaturesResponseExample1:
$ref: "../../specification/features/reset_features/examples/response/ResetFeaturesResponseExample1.yaml"
getAutoscalingCapacityResponseExample1:
$ref: "../../specification/autoscaling/get_autoscaling_capacity/examples/200_response/GetAutoscalingCapacityResponseExample1.yaml"
- target: "$.paths['/_autoscaling/policy/{name}']['get']"
description: "Add examples for get autoscaling policy response"
update:
responses:
200:
content:
application/json:
examples:
getAutoscalingPolicyResponseExample1:
$ref: "../../specification/autoscaling/get_autoscaling_policy/examples/200_response/GetAutoscalingPolicyResponseExample1.yaml"
- target: "$.paths['/_autoscaling/policy/{name}']['put']"
description: "Add examples for create autoscaling policy operation"
update:
requestBody:
content:
application/json:
examples:
createAutoscalingPolicyRequestExample1:
$ref: "../../specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample1.yaml"
createAutoscalingPolicyRequestExample2:
$ref: "../../specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample2.yaml"
responses:
200:
content:
application/json:
examples:
createAutoscalingPolicyResponseExample1:
$ref: "../../specification/autoscaling/put_autoscaling_policy/examples/200_response/PutAutoscalingPolicyResponseExample1.yaml"
## Examples for behavioral analytics
- target: "$.paths['/_application/analytics/{collection_name}/event/{event_type}']['post']"
description: "Add examples for post analytics collection event operation"
update:
requestBody:
content:
application/json:
examples:
postBehavioralAnalyticsEventRequestExample1:
$ref: "../../specification/search_application/post_behavioral_analytics_event/examples/request/BehavioralAnalyticsEventPostRequestExample1.yaml"
## Examples for ccr
- target: "$.paths['/{index}/_ccr/follow']['put']"
description: "Add examples for create follower operation"
update:
requestBody:
content:
application/json:
examples:
createFollowIndexRequestExample1:
$ref: "../../specification/ccr/follow/examples/request/CreateFollowIndexRequestExample1.yaml"
responses:
200:
content:
application/json:
examples:
createFollowIndexResponseExample1:
$ref: "../../specification/ccr/follow/examples/response/CreateFollowIndexResponseExample1.yaml"
- target: "$.paths['/{index}/_ccr/forget_follower']['post']"
description: "Add examples for forget follower operation"
update:
requestBody:
content:
application/json:
examples:
createFollowIndexRequestExample1:
$ref: "../../specification/ccr/forget_follower/examples/request/ForgetFollowerIndexRequestExample1.yaml"
responses:
200:
content:
application/json:
examples:
createFollowIndexResponseExample1:
$ref: "../../specification/ccr/forget_follower/examples/response/ForgetFollowerIndexResponseExample1.yaml"
- target: "$.paths['/_ccr/auto_follow/{name}']['put']"
description: "Add examples for create auto-follow pattern operation"
update:
requestBody:
content:
application/json:
examples:
putAutoFollowPatternRequestExample1:
$ref: "../../specification/ccr/put_auto_follow_pattern/examples/request/PutAutoFollowPatternRequestExample1.yaml"
responses:
200:
content:
application/json:
examples:
putAutoFollowPatternResponseExample1:
$ref: "../../specification/ccr/put_auto_follow_pattern/examples/response/PutAutoFollowPatternResponseExample1.yaml"
- target: "$.paths['/{index}/_ccr/resume_follow']['post']"
description: "Add examples for resume a follower operation"
update:
requestBody:
content:
application/json:
examples:
resumeFollowIndexRequestExample1:
$ref: "../../specification/ccr/resume_follow/examples/request/ResumeFollowIndexRequestExample1.yaml"
responses:
200:
content:
application/json:
examples:
resumeFollowIndexResponseExample1:
$ref: "../../specification/ccr/resume_follow/examples/response/ResumeFollowIndexResponseExample1.yaml"
## Examples for cluster
- target: "$.components['requestBodies']['cluster.allocation_explain']"
description: "Add example for cluster allocation exaplain request"
update:
content:
application/json:
examples:
clusterAllocationExplainRequestExample1:
$ref: "../../specification/cluster/allocation_explain/examples/request/ClusterAllocationExplainRequestExample1.yaml"
- target: "$.components['requestBodies']['cluster.allocation_explain']"
description: "Add examples for cluster allocation explain operation"
update:
Expand All @@ -107,6 +220,8 @@ actions:
examples:
clusterPutSettingsRequestExample1:
$ref: "../../specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml"
clusterPutSettingsRequestExample2:
$ref: "../../specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample2.yaml"
- target: "$.paths['/_cluster/reroute']['post']"
description: "Add examples for cluster reroute operation"
update:
Expand All @@ -132,16 +247,6 @@ actions:
examples:
clusterNodesReloadSecureSettingsResponseExample1:
$ref: "../../specification/nodes/reload_secure_settings/examples/response/ReloadSecureSettingsResponseExample1.yaml"
- target: "$.paths['/_tasks']['get']"
description: "Add examples for task management operation"
update:
responses:
200:
content:
application/json:
examples:
getTasksResponseExample1:
$ref: "../../specification/tasks/get/examples/200_response/GetTaskResponseExample1.yaml"
- target: "$.components['responses']['nodes.info#200']"
description: "Add response examples for nodes info"
update:
Expand All @@ -150,6 +255,38 @@ actions:
examples:
nodesInfoResponseExample1:
$ref: "../../specification/nodes/info/examples/200_response/nodesInfoResponseExample1.yaml"
## Examples for esql
- target: "$.paths['/_query/async']['post']"
description: "Add examples for async esql query operation"
update:
requestBody:
content:
application/json:
examples:
esqlAsyncQueryRequestExample1:
$ref: "../../specification/esql/async_query/examples/request/AsyncQueryRequestExample1.yaml"
## Examples for features
- target: "$.paths['/_features']['get']"
description: "Add examples for get features operation"
update:
responses:
200:
content:
application/json:
examples:
getFeaturesResponseExample1:
$ref: "../../specification/features/get_features/examples/response/GetFeaturesResponseExample1.yaml"
- target: "$.paths['/_features/_reset']['post']"
description: "Add examples for reset features operation"
update:
responses:
200:
content:
application/json:
examples:
resetFeaturesResponseExample1:
$ref: "../../specification/features/reset_features/examples/response/ResetFeaturesResponseExample1.yaml"
## Examples for ilm
- target: "$.paths['/_ilm/policy/{policy}']['delete']"
description: "Add examples for delete lifecycle policy operation"
update:
Expand Down Expand Up @@ -268,6 +405,17 @@ actions:
examples:
removePolicyResponseExample1:
$ref: "../../specification/ilm/remove_policy/examples/response/RemovePolicyResponseExample1.yaml"
## Examples for indices
- target: "$.paths['/_lifecycle/stats']['get']"
description: "Add examples for get lifecycle stats operation"
update:
responses:
200:
content:
application/json:
examples:
dataStreamLifecycleStatsResponseExample1:
$ref: "../../specification/indices/get_data_lifecycle_stats/examples/response/IndicesGetDataLifecycleStatsResponseExample1.yaml"
- target: "$.components['requestBodies']['indices.clone']"
description: "Add examples for clone index request"
update:
Expand Down Expand Up @@ -304,54 +452,6 @@ actions:
examples:
indicesOpenResponseExample1:
$ref: "../../specification/indices/open/examples/200_response/indicesOpenResponseExample1.yaml"
- target: "$.paths['/_autoscaling/policy/{name}']['delete']"
description: "Add examples for delete autoscaling policy response"
update:
responses:
200:
content:
application/json:
examples:
deleteAutoscalingPolicyResponseExample1:
$ref: "../../specification/autoscaling/delete_autoscaling_policy/examples/response/DeleteAutoscalingPolicyResponseExample1.yaml"
- target: "$.paths['/_autoscaling/capacity']['get']"
description: "Add examples for get autoscaling capacity response"
update:
responses:
200:
content:
application/json:
examples:
getAutoscalingCapacityResponseExample1:
$ref: "../../specification/autoscaling/get_autoscaling_capacity/examples/200_response/GetAutoscalingCapacityResponseExample1.yaml"
- target: "$.paths['/_autoscaling/policy/{name}']['get']"
description: "Add examples for get autoscaling policy response"
update:
responses:
200:
content:
application/json:
examples:
getAutoscalingPolicyResponseExample1:
$ref: "../../specification/autoscaling/get_autoscaling_policy/examples/200_response/GetAutoscalingPolicyResponseExample1.yaml"
- target: "$.paths['/_autoscaling/policy/{name}']['put']"
description: "Add examples for create autoscaling policy operation"
update:
requestBody:
content:
application/json:
examples:
createAutoscalingPolicyRequestExample1:
$ref: "../../specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample1.yaml"
createAutoscalingPolicyRequestExample2:
$ref: "../../specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample2.yaml"
responses:
200:
content:
application/json:
examples:
createAutoscalingPolicyResponseExample1:
$ref: "../../specification/autoscaling/put_autoscaling_policy/examples/200_response/PutAutoscalingPolicyResponseExample1.yaml"
- target: "$.components['responses']['indices.recovery#200']"
description: "Add example for get index recovery response"
update:
Expand Down Expand Up @@ -394,37 +494,15 @@ actions:
examples:
indicesLegacyPutTemplateRequestExample1:
$ref: "../../specification/indices/put_template/examples/request/indicesPutTemplateRequestExample1.yaml"
## Examples for behavioral analytics
- target: "$.paths['/_application/analytics/{collection_name}/event/{event_type}']['post']"
description: "Add examples for post analytics collection event operation"
update:
requestBody:
content:
application/json:
examples:
postBehavioralAnalyticsEventRequestExample1:
$ref: "../../specification/search_application/post_behavioral_analytics_event/examples/request/BehavioralAnalyticsEventPostRequestExample1.yaml"
## Examples for esql
- target: "$.paths['/_query/async']['post']"
description: "Add examples for async esql query operation"
update:
requestBody:
content:
application/json:
examples:
esqlAsyncQueryRequestExample1:
$ref: "../../specification/esql/async_query/examples/request/AsyncQueryRequestExample1.yaml"
## Examples for indices
- target: "$.paths['/_lifecycle/stats']['get']"
description: "Add examples for get lifecycle stats operation"
## Examples for inference
- target: "$.components['requestBodies']['inference.stream_inference']"
description: "Add example for inference stream request"
update:
responses:
200:
content:
application/json:
examples:
dataStreamLifecycleStatsResponseExample1:
$ref: "../../specification/indices/get_data_lifecycle_stats/examples/response/IndicesGetDataLifecycleStatsResponseExample1.yaml"
content:
application/json:
examples:
streamInferenceRequestExample1:
$ref: "../../specification/inference/stream_inference/examples/request/StreamInferenceRequestExample1.yaml"
## Examples for ingest
- target: "$.components['requestBodies']['simulate.ingest']"
description: "Add example for simulate ingest request"
Expand Down Expand Up @@ -519,7 +597,7 @@ actions:
examples:
renderSearchApplicationQueryRequestExample1:
$ref: "../../specification/search_application/render_query/examples/request/SearchApplicationsRenderQueryRequestExample1.yaml"
# Examples for security
## Examples for security
- target: "$.paths['/_security/api_key/_bulk_update']['post']"
description: "Add examples for bulk update API keys operation"
update:
Expand Down Expand Up @@ -554,6 +632,17 @@ actions:
examples:
delegatePkiResponseExample1:
$ref: "../../specification/security/delegate_pki/examples/200_response/SecurityDelegatePkiResponseExample1.yaml"
## Examples for tasks
- target: "$.paths['/_tasks']['get']"
description: "Add examples for task management operation"
update:
responses:
200:
content:
application/json:
examples:
getTasksResponseExample1:
$ref: "../../specification/tasks/get/examples/200_response/GetTaskResponseExample1.yaml"
## Examples for watcher
- target: "$.paths['/_watcher/settings']['put']"
description: "Add request example for update watcher settings"
Expand All @@ -574,12 +663,4 @@ actions:
examples:
updateWatcherSettingsRequestExample1:
$ref: "../../specification/watcher/get_settings/examples/200_response/WatcherGetSettingsResponseExample1.yaml"
## Examples for inference
- target: "$.components['requestBodies']['inference.stream_inference']"
description: "Add example for inference stream request"
update:
content:
application/json:
examples:
streamInferenceRequestExample1:
$ref: "../../specification/inference/stream_inference/examples/request/StreamInferenceRequestExample1.yaml"

Loading

0 comments on commit bd697b5

Please sign in to comment.