Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert examples to yaml and add subfolders #3458

Merged
merged 7 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 25 additions & 23 deletions docs/overlays/elasticsearch-openapi-overlays.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ actions:
application/json:
examples:
getFeaturesResponseExample1:
$ref: "../../specification/features/get_features/FeaturesApiResponseExample1.json"
$ref: "../../specification/features/get_features/examples/response/GetFeaturesResponseExample1.yaml"
- target: "$.paths['/_features/_reset']['post']"
description: "Add examples for reset features operation"
update:
Expand All @@ -81,23 +81,23 @@ actions:
application/json:
examples:
resetFeaturesResponseExample1:
$ref: "../../specification/features/reset_features/ResetFeaturesResponseExample1.json"
$ref: "../../specification/features/reset_features/examples/response/ResetFeaturesResponseExample1.yaml"
- target: "$.components['requestBodies']['cluster.allocation_explain']"
description: "Add examples for cluster allocation explain operation"
update:
content:
application/json:
examples:
clusterAllocationExplainRequestExample1:
$ref: "../../specification/cluster/allocation_explain/clusterAllocationExplainRequestExample1.json"
$ref: "../../specification/cluster/allocation_explain/examples/request/clusterAllocationExplainRequestExample1.yaml"
- target: "$.components['responses']['cluster.health#200']"
description: "Add examples for cluster health operation"
update:
content:
application/json:
examples:
clusterHealthResponseExample1:
$ref: "../../specification/cluster/health/clusterHealthResponseExample1.json"
$ref: "../../specification/cluster/health/examples/response/clusterHealthResponseExample1.yaml"
- target: "$.paths['/_cluster/settings']['put']"
description: "Add examples for cluster update settings operation"
update:
Expand All @@ -106,7 +106,7 @@ actions:
application/json:
examples:
clusterPutSettingsRequestExample1:
$ref: "../../specification/cluster/put_settings/clusterPutSettingsRequestExample1.json"
$ref: "../../specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml"
- target: "$.paths['/_cluster/reroute']['post']"
description: "Add examples for cluster reroute operation"
update:
Expand All @@ -115,23 +115,23 @@ actions:
application/json:
examples:
clusterRerouteRequestExample1:
$ref: "../../specification/cluster/reroute/clusterRerouteRequestExample1.json"
$ref: "../../specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml"
- target: "$.components['requestBodies']['nodes.reload_secure_settings']"
description: "Add examples for nodes reload secure settings operation"
update:
content:
application/json:
examples:
clusterNodesReloadSecureSettingsRequestExample1:
$ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsRequestExample1.json"
$ref: "../../specification/nodes/reload_secure_settings/examples/request/ReloadSecureSettingsRequestExample1.yaml"
- target: "$.components['responses']['nodes.reload_secure_settings#200']"
description: "Add response examples for nodes reload secure settings operation"
update:
content:
application/json:
examples:
clusterNodesReloadSecureSettingsResponseExample1:
$ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsResponseExample1.json"
$ref: "../../specification/nodes/reload_secure_settings/examples/response/ReloadSecureSettingsResponseExample1.yaml"
- target: "$.paths['/_tasks']['get']"
description: "Add examples for task management operation"
update:
Expand All @@ -141,7 +141,7 @@ actions:
application/json:
examples:
getTasksResponseExample1:
$ref: "../../specification/tasks/get/getTasksResponseExample1.json"
$ref: "../../specification/tasks/get/examples/response/GetTaskResponseExample1.yaml"
- target: "$.components['responses']['nodes.info#200']"
description: "Add response examples for nodes info"
update:
Expand All @@ -159,7 +159,7 @@ actions:
application/json:
examples:
deleteLifecycleResponseExample1:
$ref: "../../specification/ilm/delete_lifecycle/DeleteLifecycleResponseExample1.json"
$ref: "../../specification/ilm/delete_lifecycle/examples/response/DeleteLifecycleResponseExample1.yaml"
- target: "$.paths['/_ilm/policy/{policy}']['put']"
description: "Add examples for create a lifecycle operation"
update:
Expand All @@ -168,22 +168,22 @@ actions:
application/json:
examples:
putLifecycleRequestExample1:
$ref: "../../specification/ilm/put_lifecycle/PutLifecycleRequestExample1.json"
$ref: "../../specification/ilm/put_lifecycle/examples/request/PutLifecycleRequestExample1.yaml"
responses:
200:
content:
application/json:
examples:
putLifecycleResponseExample1:
$ref: "../../specification/ilm/put_lifecycle/PutLifecycleResponseExample1.json"
$ref: "../../specification/ilm/put_lifecycle/examples/response/PutLifecycleResponseExample1.yaml"
- target: "$.components['responses']['ilm.get_lifecycle#200']"
description: "Add examples for get lifecycle policy operation"
update:
content:
application/json:
examples:
getLifecycleResponseExample1:
$ref: "../../specification/ilm/get_lifecycle/GetLifecycleResponseExample1.json"
$ref: "../../specification/ilm/get_lifecycle/examples/response/GetLifecycleResponseExample1.yaml"
- target: "$.paths['/_ilm/migrate_to_data_tiers']['post']"
description: "Add examples for migrate to data tiers routing operation"
update:
Expand All @@ -192,14 +192,14 @@ actions:
application/json:
examples:
migrateToDataTiersRequestExample1:
$ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersRequestExample1.json"
$ref: "../../specification/ilm/migrate_to_data_tiers/examples/request/RequestExample1.yaml"
responses:
200:
content:
application/json:
examples:
migrateToDataTiersResponseExample1:
$ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersResponseExample1.json"
$ref: "../../specification/ilm/migrate_to_data_tiers/examples/response/ResponseExample1.yaml"
- target: "$.paths['/_ilm/move/{index}']['post']"
description: "Add examples for move to lifecycle step operation"
update:
Expand All @@ -208,14 +208,16 @@ actions:
application/json:
examples:
moveToStepRequestExample1:
$ref: "../../specification/ilm/move_to_step/MoveToStepRequestExample1.json"
$ref: "../../specification/ilm/move_to_step/examples/request/MoveToStepRequestExample1.yaml"
moveToStepRequestExample2:
$ref: "../../specification/ilm/move_to_step/examples/request/MoveToStepRequestExample2.yaml"
responses:
200:
content:
application/json:
examples:
moveToStepResponseExample1:
$ref: "../../specification/ilm/move_to_step/MoveToStepResponseExample1.json"
$ref: "../../specification/ilm/move_to_step/examples/response/MoveToStepResponseExample1.yaml"
- target: "$.paths['/_ilm/start']['post']"
description: "Add examples for start index lifecycle management operation"
update:
Expand All @@ -225,7 +227,7 @@ actions:
application/json:
examples:
startILMResponseExample1:
$ref: "../../specification/ilm/start/StartILMResponseExample1.json"
$ref: "../../specification/ilm/start/examples/response/StartILMResponseExample1.yaml"
- target: "$.paths['/_ilm/stop']['post']"
description: "Add examples for stop index lifecycle management operation"
update:
Expand All @@ -235,7 +237,7 @@ actions:
application/json:
examples:
stopILMResponseExample1:
$ref: "../../specification/ilm/stop/stopILMResponseExample1.json"
$ref: "../../specification/ilm/stop/examples/response/StopILMResponseExample1.yaml"
- target: "$.paths['/_ilm/status']['get']"
description: "Add examples for get index lifecycle management status operation"
update:
Expand All @@ -245,7 +247,7 @@ actions:
application/json:
examples:
getILMStatusResponseExample1:
$ref: "../../specification/ilm/get_status/GetILMStatusResponseExample1.json"
$ref: "../../specification/ilm/get_status/examples/response/GetILMStatusResponseExample1.yaml"
- target: "$.paths['/{index}/_ilm/explain']['get']"
description: "Add examples for explain lifecycle operation"
update:
Expand All @@ -255,7 +257,7 @@ actions:
application/json:
examples:
explainLifecycleResponseExample1:
$ref: "../../specification/ilm/explain_lifecycle/ExplainLifecycleResponseExample1.json"
$ref: "../../specification/ilm/explain_lifecycle/examples/response/ExplainLifecycleResponseExample1.yaml"
- target: "$.paths['/{index}/_ilm/remove']['post']"
description: "Add examples for remove policy from index operation"
update:
Expand All @@ -265,7 +267,7 @@ actions:
application/json:
examples:
removePolicyResponseExample1:
$ref: "../../specification/ilm/remove_policy/RemovePolicyResponseExample1.json"
$ref: "../../specification/ilm/remove_policy/examples/response/RemovePolicyResponseExample1.yaml"
- target: "$.components['requestBodies']['indices.clone']"
description: "Add examples for clone index request"
update:
Expand All @@ -283,7 +285,7 @@ actions:
application/json:
examples:
indicesCloseResponseExample1:
$ref: "../../specification/indices/close/indicesCloseResponseExample1.yaml"
$ref: "../../specification/indices/close/examples/response/CloseIndexResponseExample1.yaml"
- target: "$.components['responses']['indices.data_streams_stats#200']"
description: "Add example for data stream stats response"
update:
Expand Down
32 changes: 16 additions & 16 deletions docs/overlays/elasticsearch-shared-overlays.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1077,15 +1077,15 @@ actions:
application/json:
examples:
asyncSearchSubmitRequestExample1:
$ref: "../../specification/async_search/submit/AsyncSearchSubmitRequestExample1.json"
$ref: "../../specification/async_search/submit/examples/request/AsyncSearchSubmitRequestExample1.yaml"
- target: "$.components['responses']['async_search.submit#200']"
description: "Add example for asynch search submit response"
update:
content:
application/json:
examples:
asyncSearchSubmitResponseExample1:
$ref: "../../specification/async_search/submit/AsyncSearchSubmitResponseExample1.json"
$ref: "../../specification/async_search/submit/examples/response/AsyncSearchSubmitResponseExample1.yaml"
- target: "$.paths['/_transform/{transform_id}']['put']"
description: "Add examples for create transform operation"
update:
Expand All @@ -1094,32 +1094,32 @@ actions:
application/json:
examples:
createTransformRequestExample1:
$ref: "../../specification/transform/put_transform/PutTransformRequestExample1.json"
$ref: "../../specification/transform/put_transform/examples/request/PutTransformRequestExample1.yaml"
createTransformRequestExample2:
$ref: "../../specification/transform/put_transform/PutTransformRequestExample2.json"
$ref: "../../specification/transform/put_transform/examples/request/PutTransformRequestExample2.yaml"
responses:
200:
content:
application/json:
examples:
createTransformResponseExample1:
$ref: "../../specification/transform/put_transform/PutTransformResponseExample1.json"
$ref: "../../specification/transform/put_transform/examples/response/PutTransformResponseExample1.yaml"
- target: "$.components['requestBodies']['transform.preview_transform']"
description: "Add examples for preview transform operation"
update:
content:
application/json:
examples:
previewTransformRequestExample1:
$ref: "../../specification/transform/preview_transform/PreviewTransformRequestExample1.json"
$ref: "../../specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.yaml"
- target: "$.components['responses']['transform.preview_transform#200']"
description: "Add examples for preview transform operation"
update:
content:
application/json:
examples:
previewTransformResponseExample1:
$ref: "../../specification/transform/preview_transform/PreviewTransformResponseExample1.json"
$ref: "../../specification/transform/preview_transform/examples/response/PreviewTransformResponseExample1.yaml"
- target: "$.paths['/_transform/{transform_id}/_update']['post']"
description: "Add examples for update transform operation"
update:
Expand All @@ -1128,14 +1128,14 @@ actions:
application/json:
examples:
updateTransformRequestExample1:
$ref: "../../specification/transform/update_transform/UpdateTransformRequestExample1.json"
$ref: "../../specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.yaml"
responses:
200:
content:
application/json:
examples:
updateTransformResponseExample1:
$ref: "../../specification/transform/update_transform/UpdateTransformResponseExample1.json"
$ref: "../../specification/transform/update_transform/examples/response/UpdateTransformResponseExample1.yaml"
- target: "$.paths['/_eql/search/status/{id}']['get']"
description: "Add examples for get async EQL status operation"
update:
Expand All @@ -1145,25 +1145,25 @@ actions:
application/json:
examples:
eqlGetStatusResponseExample1:
$ref: "../../specification/eql/get_status/EqlGetStatusResponseExample1.json"
$ref: "../../specification/eql/get_status/examples/response/EqlGetStatusResponseExample1.yaml"
- target: "$.components['requestBodies']['eql.search']"
description: "Add examples for EQL search operation"
update:
content:
application/json:
examples:
eqlSearchRequestExample1:
$ref: "../../specification/eql/search/EqlSearchRequestExample1.json"
$ref: "../../specification/eql/search/examples/request/EqlSearchRequestExample1.yaml"
eqlSearchRequestExample2:
$ref: "../../specification/eql/search/EqlSearchRequestExample2.json"
$ref: "../../specification/eql/search/examples/request/EqlSearchRequestExample2.yaml"
- target: "$.components['reponses']['eql.search#200']"
description: "Add examples for EQL search operation"
update:
content:
application/json:
examples:
eqlSearchResponseExample2:
$ref: "../../specification/eql/search/EqlSearchResponseExample2.json"
$ref: "../../specification/eql/search/examples/response/EqlSearchResponseExample2.yaml"
- target: "$.paths['/_query']['post']"
description: "Add examples for ES|QL query operation"
update:
Expand All @@ -1172,15 +1172,15 @@ actions:
application/json:
examples:
esqlQueryRequestExample1:
$ref: "../../specification/esql/query/EsqlQueryApiRequestExample1.json"
$ref: "../../specification/esql/query/examples/request/QueryRequestExample1.yaml"
- target: "$.components['requestBodies']['graph.explore']"
description: "Add example for graph explore request"
update:
content:
application/json:
examples:
graphExploreRequestExample1:
$ref: "../../specification/graph/explore/graphExploreRequestExample1.json"
$ref: "../../specification/graph/explore/examples/request/GraphExploreRequestExample1.yaml"
- target: "$.paths['/{index}/_block/{block}']['put']"
description: "Add examples for add index block operation"
update:
Expand Down Expand Up @@ -1334,7 +1334,7 @@ actions:
application/json:
examples:
indicesResolveResponseExample1:
$ref: "../../specification/indices/resolve_index/ResolveIndexResponseExample1.yaml"
$ref: "../../specification/indices/resolve_index/examples/response/ResolveIndexResponseExample1.yaml"
- target: "$.components['requestBodies']['indices.rollover']"
description: "Add example for rollover index request"
update:
Expand Down
7 changes: 7 additions & 0 deletions output/openapi/elasticsearch-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading