Skip to content

Commit 50f6e64

Browse files
committed
Add more example overlays
1 parent d15f0f5 commit 50f6e64

File tree

3 files changed

+90
-25
lines changed

3 files changed

+90
-25
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ actions:
163163
- target: "$.paths['/_ilm/policy/{policy}']['put']"
164164
description: "Add examples for create a lifecycle operation"
165165
update:
166-
update:
167166
requestBody:
168167
content:
169168
application/json:
@@ -188,7 +187,6 @@ actions:
188187
- target: "$.paths['/_ilm/migrate_to_data_tiers']['post']"
189188
description: "Add examples for migrate to data tiers routing operation"
190189
update:
191-
update:
192190
requestBody:
193191
content:
194192
application/json:
@@ -205,7 +203,6 @@ actions:
205203
- target: "$.paths['/_ilm/move/{index}']['post']"
206204
description: "Add examples for move to lifecycle step operation"
207205
update:
208-
update:
209206
requestBody:
210207
content:
211208
application/json:
@@ -338,7 +335,6 @@ actions:
338335
- target: "$.paths['/_autoscaling/policy/{name}']['put']"
339336
description: "Add examples for create autoscaling policy operation"
340337
update:
341-
update:
342338
requestBody:
343339
content:
344340
application/json:
@@ -353,4 +349,38 @@ actions:
353349
application/json:
354350
examples:
355351
createAutoscalingPolicyResponseExample1:
356-
$ref: "../../specification/autoscaling/put_autoscaling_policy/autoscalingApisPutAutoscalingPolicyResponseExample1.yaml"
352+
$ref: "../../specification/autoscaling/put_autoscaling_policy/autoscalingApisPutAutoscalingPolicyResponseExample1.yaml"
353+
- target: "$.components['responses']['indices.recovery#200']"
354+
description: "Add example for get index recovery response"
355+
update:
356+
content:
357+
application/json:
358+
examples:
359+
getIndicesRecoveryResponseExample1:
360+
$ref: "../../specification/indices/recovery/indicesRecoveryResponseExample1.yaml"
361+
- target: "$.paths['/_resolve/cluster/{name}']['get']"
362+
description: "Add examples for resolve cluster operation"
363+
update:
364+
responses:
365+
200:
366+
content:
367+
application/json:
368+
examples:
369+
resolveClusterResponseExample1:
370+
$ref: "../../specification/indices/resolve_cluster/ResolveClusterResponseExample1.yaml"
371+
- target: "$.components['requestBodies']['indices.shrink']"
372+
description: "Add example for shrink index request"
373+
update:
374+
content:
375+
application/json:
376+
examples:
377+
indicesShrinkRequestExample1:
378+
$ref: "../../specification/indices/shrink/indicesShrinkRequestExample1.yaml"
379+
- target: "$.components['requestBodies']['indices.split']"
380+
description: "Add example for split index request"
381+
update:
382+
content:
383+
application/json:
384+
examples:
385+
indicesSplitRequestExample1:
386+
$ref: "../../specification/indices/split/indicesSplitRequestExample1.yaml"

docs/overlays/elasticsearch-serverless-openapi-overlays.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ actions:
2323
- target: '$.components'
2424
description: Add securitySchemes
2525
update:
26-
securitySchemes:
27-
apiKeyAuth:
28-
description: |
29-
Elasticsearch APIs use key-based authentication.
30-
You must create an API key and use the encoded value in the request header.
31-
For example:
32-
33-
34-
```
35-
curl -X GET "${ES_URL}/_cat/indices?v=true" \
36-
-H "Authorization: ApiKey ${API_KEY}"
37-
```
38-
39-
To get API keys for the Elasticsearch endpoint (${ES_URL}) for a project, refer to [Connect to your Elasticsearch Serverless endpoint](https://www.elastic.co/guide/en/serverless/current/elasticsearch-connecting-to-es-serverless-endpoint.html).
40-
in: header
41-
name: Authorization
42-
type: apiKey
26+
securitySchemes:
27+
apiKeyAuth:
28+
description: |
29+
Elasticsearch APIs use key-based authentication.
30+
You must create an API key and use the encoded value in the request header.
31+
For example:
32+
33+
34+
```
35+
curl -X GET "${ES_URL}/_cat/indices?v=true" \
36+
-H "Authorization: ApiKey ${API_KEY}"
37+
```
38+
39+
To get API keys for the Elasticsearch endpoint (${ES_URL}) for a project, refer to [Connect to your Elasticsearch Serverless endpoint](https://www.elastic.co/guide/en/serverless/current/elasticsearch-connecting-to-es-serverless-endpoint.html).
40+
in: header
41+
name: Authorization
42+
type: apiKey
4343
- target: '$'
4444
description: Add document security
4545
update:

docs/overlays/elasticsearch-shared-overlays.yaml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,12 +1265,47 @@ actions:
12651265
application/json:
12661266
examples:
12671267
indicesPutIndexTemplateRequestExample1:
1268-
$ref: "../../specification/indices/put_index_template/IndicesPutIndexTemplateRequestExample1.yaml"
1268+
$ref: "../../specification/indices/put_index_template/indicesPutIndexTemplateRequestExample1.yaml"
12691269
- target: "$.components['requestBodies']['indices.put_mapping']"
1270-
description: "Add example for put mapping request"
1270+
description: "Add example for update mapping request"
12711271
update:
12721272
content:
12731273
application/json:
12741274
examples:
12751275
indicesPutSettingRequestExample1:
1276-
$ref: "../../specification/indices/put_settings/IndicesPutSettingsRequestExample1.yaml"
1276+
$ref: "../../specification/indices/put_mapping/indicesPutMappingRequestExample1.yaml"
1277+
- target: "$.components['requestBodies']['indices.put_settings']"
1278+
description: "Add example for update index settings request"
1279+
update:
1280+
content:
1281+
application/json:
1282+
examples:
1283+
indicesPutSettingRequestExample1:
1284+
$ref: "../../specification/indices/put_settings/IndicesPutSettingsRequestExample1.yaml"
1285+
- target: "$.paths['/_resolve/index/{name}']['get']"
1286+
description: "Add examples for resolve index operation"
1287+
update:
1288+
responses:
1289+
200:
1290+
content:
1291+
application/json:
1292+
examples:
1293+
indicesResolveResponseExample1:
1294+
$ref: "../../specification/indices/resolve_index/indicesResolveResponseExample1.yaml"
1295+
- target: "$.components['requestBodies']['indices.rollover']"
1296+
description: "Add example for rollover index request"
1297+
update:
1298+
content:
1299+
application/json:
1300+
examples:
1301+
indicesRolloverRequestExample1:
1302+
$ref: "../../specification/indices/rollover/indicesRolloverRequestExample1.yaml"
1303+
- target: "$.components['responses']['indices.rollover#200']"
1304+
description: "Add example for rollover index response"
1305+
update:
1306+
content:
1307+
application/json:
1308+
examples:
1309+
indicesRolloverResponseExample1:
1310+
$ref: "../../specification/indices/rollover/indicesRolloverResponseExample1.yaml"
1311+

0 commit comments

Comments
 (0)