Skip to content

Commit

Permalink
fix issues
Browse files Browse the repository at this point in the history
Signed-off-by: Ruirui Zhang <[email protected]>
  • Loading branch information
ruai0511 committed Oct 29, 2024
1 parent 493d5ae commit 37729e4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 24 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added `config_id` and `config_id_list` to `/_plugins/_notifications/configs` query parameters ([#594](https://github.com/opensearch-project/opensearch-api-specification/pull/594))
- Added a release workflow triggered on a tag ([#635](https://github.com/opensearch-project/opensearch-api-specification/pull/635))
- Added API spec for query insights plugin ([#625](https://github.com/opensearch-project/opensearch-api-specification/pull/625))
- Added API specs for query groups lifecycle APIs ([#649](https://github.com/opensearch-project/opensearch-api-specification/pull/649))
- Added API spec for `adjust_pure_negative` for bool queries ([#641](https://github.com/opensearch-project/opensearch-api-specification/pull/641))
- Added a spec style checker [#620](https://github.com/opensearch-project/opensearch-api-specification/pull/620).
- Added `remote_store` to node `Stats` ([#643](https://github.com/opensearch-project/opensearch-api-specification/pull/643))
Expand Down
14 changes: 7 additions & 7 deletions spec/namespaces/wlm.yaml → spec/namespaces/query_group.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: OpenSearch Workload Management API
description: OpenSearch Workload Management API
title: OpenSearch Workload Management Query Group API
description: Query group lifecycle APIs for the workload management plugin.
version: 1.0.0
paths:
/_wlm/query_group:
Expand Down Expand Up @@ -62,27 +62,27 @@ components:
content:
application/json:
schema:
$ref: '../schemas/wlm._common.yaml#/components/schemas/QueryGroupCreate'
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupCreate'
required: true
query_group.update:
content:
application/json:
schema:
$ref: '../schemas/wlm._common.yaml#/components/schemas/QueryGroupUpdate'
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupUpdate'
required: true
responses:
query_group.create@200:
description: ''
content:
application/json:
schema:
$ref: '../schemas/wlm._common.yaml#/components/schemas/QueryGroupResponse'
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupResponse'
query_group.update@200:
description: ''
content:
application/json:
schema:
$ref: '../schemas/wlm._common.yaml#/components/schemas/QueryGroupResponse'
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupResponse'
query_group.delete@200:
description: ''
content:
Expand All @@ -102,7 +102,7 @@ components:
query_groups:
type: array
items:
$ref: '../schemas/wlm._common.yaml#/components/schemas/QueryGroupResponse'
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupResponse'
parameters:
query_group.update::path.name:
name: name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ components:
type: string
resiliency_mode:
type: string
enum: [ "soft", "enforced", "monitor" ]
enum: [enforced, monitor,soft]
updated_at:
type: integer
format: int64
Expand Down Expand Up @@ -45,16 +45,16 @@ components:
- _id
- name
- resiliency_mode
- updated_at
- resource_limits
- updated_at
QueryGroupCreate:
type: object
properties:
name:
type: string
resiliency_mode:
type: string
enum: [ "soft", "enforced", "monitor" ]
enum: [enforced, monitor,soft]
resource_limits:
anyOf:
- type: object
Expand Down Expand Up @@ -86,13 +86,15 @@ components:
properties:
resiliency_mode:
type: string
enum: [ "soft", "enforced", "monitor" ]
enum: [enforced, monitor,soft]
resource_limits:
type: object
properties:
memory:
type: number
format: double
cpu:
type: number
format: double
$ref: '#/components/schemas/ResourceLimitsSchema'
ResourceLimitsSchema:
type: object
properties:
memory:
type: number
format: double
cpu:
type: number
format: double
10 changes: 5 additions & 5 deletions tests/plugins/wlm/query_group/query_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ chapters:
status: 200
payload:
query_groups:
- name: analytics2
resource_limits:
memory: 0.25
cpu: 0.25
resiliency_mode: enforced
- name: analytics2
resource_limits:
memory: 0.25
cpu: 0.25
resiliency_mode: enforced

epilogues:
- path: /_wlm/query_group/analytics
Expand Down

0 comments on commit 37729e4

Please sign in to comment.