Skip to content

Commit 5fcbc26

Browse files
committed
Added missing verbs to /_opendistro/_ism/explain.
Signed-off-by: dblock <[email protected]>
1 parent d5c2b66 commit 5fcbc26

File tree

4 files changed

+46
-8
lines changed

4 files changed

+46
-8
lines changed

spec/_superseded_operations.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,12 @@ $schema: ./json_schemas/_superseded_operations.schema.yaml
189189
superseded_by: /_plugins/_ism/explain
190190
operations:
191191
- GET
192+
- POST
192193
/_opendistro/_ism/explain/{index}:
193194
superseded_by: /_plugins/_ism/explain/{index}
194195
operations:
195196
- GET
197+
- POST
196198
/_opendistro/_ism/policies:
197199
superseded_by: /_plugins/_ism/policies
198200
operations:

spec/namespaces/ism.yaml

+28-1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ paths:
169169
description: Gets the currently applied policy on all indices.
170170
externalDocs:
171171
url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index
172+
requestBody:
173+
$ref: '#/components/requestBodies/ism.explain'
172174
responses:
173175
'200':
174176
$ref: '#/components/responses/ism.explain@200'
@@ -178,6 +180,8 @@ paths:
178180
description: Gets the currently applied policy on all indices.
179181
externalDocs:
180182
url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index
183+
requestBody:
184+
$ref: '#/components/requestBodies/ism.explain'
181185
responses:
182186
'200':
183187
$ref: '#/components/responses/ism.explain@200'
@@ -190,6 +194,21 @@ paths:
190194
url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index
191195
parameters:
192196
- $ref: '#/components/parameters/ism.explain_policy::path.index'
197+
requestBody:
198+
$ref: '#/components/requestBodies/ism.explain_policy'
199+
responses:
200+
'200':
201+
$ref: '#/components/responses/ism.explain_policy@200'
202+
post:
203+
operationId: ism.explain_policy.1
204+
x-operation-group: ism.explain_policy
205+
description: Gets the currently applied policy on an index.
206+
externalDocs:
207+
url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index
208+
parameters:
209+
- $ref: '#/components/parameters/ism.explain_policy::path.index'
210+
requestBody:
211+
$ref: '#/components/requestBodies/ism.explain_policy'
193212
responses:
194213
'200':
195214
$ref: '#/components/responses/ism.explain_policy@200'
@@ -275,6 +294,14 @@ components:
275294
application/json:
276295
schema:
277296
$ref: '../schemas/ism._common.yaml#/components/schemas/RetryIndexRequest'
297+
ism.explain:
298+
content:
299+
application/json:
300+
schema: {}
301+
ism.explain_policy:
302+
content:
303+
application/json:
304+
schema: {}
278305
responses:
279306
ism.exists_policy@200:
280307
content:
@@ -348,7 +375,7 @@ components:
348375
content:
349376
application/json:
350377
schema:
351-
$ref: '../schemas/ism._common.yaml#/components/schemas/ExplainResponse'
378+
$ref: '../schemas/ism._common.yaml#/components/schemas/ExplainIndexResponse'
352379
ism.explain_policy@200:
353380
content:
354381
application/json:

spec/schemas/ism._common.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,6 @@ components:
300300
properties:
301301
state:
302302
type: string
303-
ExplainResponse:
304-
type: object
305-
properties:
306-
total_managed_indices:
307-
type: number
308303
ExplainIndexResponse:
309304
type: object
310305
properties:

tests/default/ism/explain.yaml

+16-2
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,28 @@ prologues:
2626
payload:
2727
policy_id: ${policy.id}
2828
chapters:
29-
- synopsis: Get the total managed indices count.
29+
- synopsis: Get the total managed indices count (GET).
3030
path: /_plugins/_ism/explain
3131
method: GET
32-
- synopsis: Get the current policy for an index.
32+
- synopsis: Get the total managed indices count (POST).
33+
version: '>= 2.12'
34+
path: /_plugins/_ism/explain
35+
method: POST
36+
request:
37+
payload: {}
38+
- synopsis: Get the current policy for an index (GET).
3339
path: /_plugins/_ism/explain/{index}
3440
method: GET
3541
parameters:
3642
index: books
43+
- synopsis: Get the current policy for an index (POST).
44+
version: '>= 2.12'
45+
path: /_plugins/_ism/explain/{index}
46+
method: POST
47+
parameters:
48+
index: books
49+
request:
50+
payload: {}
3751
epilogues:
3852
- path: /_plugins/_ism/policies/rollover
3953
method: DELETE

0 commit comments

Comments
 (0)