Skip to content

Commit 37729e4

Browse files
committed
fix issues
Signed-off-by: Ruirui Zhang <[email protected]>
1 parent 493d5ae commit 37729e4

File tree

4 files changed

+27
-24
lines changed

4 files changed

+27
-24
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
106106
- Added `config_id` and `config_id_list` to `/_plugins/_notifications/configs` query parameters ([#594](https://github.com/opensearch-project/opensearch-api-specification/pull/594))
107107
- Added a release workflow triggered on a tag ([#635](https://github.com/opensearch-project/opensearch-api-specification/pull/635))
108108
- Added API spec for query insights plugin ([#625](https://github.com/opensearch-project/opensearch-api-specification/pull/625))
109+
- Added API specs for query groups lifecycle APIs ([#649](https://github.com/opensearch-project/opensearch-api-specification/pull/649))
109110
- Added API spec for `adjust_pure_negative` for bool queries ([#641](https://github.com/opensearch-project/opensearch-api-specification/pull/641))
110111
- Added a spec style checker [#620](https://github.com/opensearch-project/opensearch-api-specification/pull/620).
111112
- Added `remote_store` to node `Stats` ([#643](https://github.com/opensearch-project/opensearch-api-specification/pull/643))

spec/namespaces/wlm.yaml renamed to spec/namespaces/query_group.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.1.0
22
info:
3-
title: OpenSearch Workload Management API
4-
description: OpenSearch Workload Management API
3+
title: OpenSearch Workload Management Query Group API
4+
description: Query group lifecycle APIs for the workload management plugin.
55
version: 1.0.0
66
paths:
77
/_wlm/query_group:
@@ -62,27 +62,27 @@ components:
6262
content:
6363
application/json:
6464
schema:
65-
$ref: '../schemas/wlm._common.yaml#/components/schemas/QueryGroupCreate'
65+
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupCreate'
6666
required: true
6767
query_group.update:
6868
content:
6969
application/json:
7070
schema:
71-
$ref: '../schemas/wlm._common.yaml#/components/schemas/QueryGroupUpdate'
71+
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupUpdate'
7272
required: true
7373
responses:
7474
query_group.create@200:
7575
description: ''
7676
content:
7777
application/json:
7878
schema:
79-
$ref: '../schemas/wlm._common.yaml#/components/schemas/QueryGroupResponse'
79+
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupResponse'
8080
query_group.update@200:
8181
description: ''
8282
content:
8383
application/json:
8484
schema:
85-
$ref: '../schemas/wlm._common.yaml#/components/schemas/QueryGroupResponse'
85+
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupResponse'
8686
query_group.delete@200:
8787
description: ''
8888
content:
@@ -102,7 +102,7 @@ components:
102102
query_groups:
103103
type: array
104104
items:
105-
$ref: '../schemas/wlm._common.yaml#/components/schemas/QueryGroupResponse'
105+
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupResponse'
106106
parameters:
107107
query_group.update::path.name:
108108
name: name

spec/schemas/wlm._common.yaml renamed to spec/schemas/query_group._common.yaml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ components:
1515
type: string
1616
resiliency_mode:
1717
type: string
18-
enum: [ "soft", "enforced", "monitor" ]
18+
enum: [enforced, monitor,soft]
1919
updated_at:
2020
type: integer
2121
format: int64
@@ -45,16 +45,16 @@ components:
4545
- _id
4646
- name
4747
- resiliency_mode
48-
- updated_at
4948
- resource_limits
49+
- updated_at
5050
QueryGroupCreate:
5151
type: object
5252
properties:
5353
name:
5454
type: string
5555
resiliency_mode:
5656
type: string
57-
enum: [ "soft", "enforced", "monitor" ]
57+
enum: [enforced, monitor,soft]
5858
resource_limits:
5959
anyOf:
6060
- type: object
@@ -86,13 +86,15 @@ components:
8686
properties:
8787
resiliency_mode:
8888
type: string
89-
enum: [ "soft", "enforced", "monitor" ]
89+
enum: [enforced, monitor,soft]
9090
resource_limits:
91-
type: object
92-
properties:
93-
memory:
94-
type: number
95-
format: double
96-
cpu:
97-
type: number
98-
format: double
91+
$ref: '#/components/schemas/ResourceLimitsSchema'
92+
ResourceLimitsSchema:
93+
type: object
94+
properties:
95+
memory:
96+
type: number
97+
format: double
98+
cpu:
99+
type: number
100+
format: double

tests/plugins/wlm/query_group/query_group.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ chapters:
5050
status: 200
5151
payload:
5252
query_groups:
53-
- name: analytics2
54-
resource_limits:
55-
memory: 0.25
56-
cpu: 0.25
57-
resiliency_mode: enforced
53+
- name: analytics2
54+
resource_limits:
55+
memory: 0.25
56+
cpu: 0.25
57+
resiliency_mode: enforced
5858

5959
epilogues:
6060
- path: /_wlm/query_group/analytics

0 commit comments

Comments
 (0)