Skip to content

Commit

Permalink
modify query_group spec
Browse files Browse the repository at this point in the history
Signed-off-by: Ruirui Zhang <[email protected]>
  • Loading branch information
ruai0511 committed Jun 24, 2024
1 parent 5acb8cd commit 41b2b46
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 23 deletions.
46 changes: 26 additions & 20 deletions spec/namespaces/query_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ paths:
'200':
$ref: '#/components/responses/query_group.get@200'
put:
operationId: query_group.put.0
x-operation-group: query_group.put
operationId: query_group.create
x-operation-group: query_group.create
x-version-added: '2.16'
description: Creates or updates a specified query group.
description: Creates a specified query group.
requestBody:
$ref: '#/components/requestBodies/query_group.put.0'
$ref: '#/components/requestBodies/query_group.create'
responses:
'200':
$ref: '#/components/responses/query_group.put@200'
$ref: '#/components/responses/query_group.create@200'
delete:
operationId: query_group.delete.0
x-operation-group: query_group.delete
Expand All @@ -43,17 +43,17 @@ paths:
'200':
$ref: '#/components/responses/query_group.get@200'
put:
operationId: query_group.put.1
x-operation-group: query_group.put
operationId: query_group.update
x-operation-group: query_group.update
x-version-added: '2.16'
description: Creates or updates a specified query group.
description: Updates a specified query group.
parameters:
- $ref: '#/components/parameters/query_group.put::path.name'
- $ref: '#/components/parameters/query_group.update::path.name'
requestBody:
$ref: '#/components/requestBodies/query_group.put.1'
$ref: '#/components/requestBodies/query_group.update'
responses:
'200':
$ref: '#/components/responses/query_group.put@200'
$ref: '#/components/responses/query_group.update@200'
delete:
operationId: query_group.delete.1
x-operation-group: query_group.delete
Expand All @@ -66,29 +66,35 @@ paths:
$ref: '#/components/responses/query_group.delete@200'
components:
requestBodies:
query_group.put.0:
query_group.create:
content:
application/json:
schema:
type: object
properties:
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupCreateStructure'
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupCreate'
required: true
query_group.put.1:
query_group.update:
content:
application/json:
schema:
type: object
properties:
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupUpdateStructure'
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupUpdate'
required: true
responses:
query_group.put@200:
query_group.create@200:
description: ''
content:
application/json:
schema:
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupResponseStructure'
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupResponse'
query_group.update@200:
description: ''
content:
application/json:
schema:
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupResponse'
query_group.delete@200:
description: ''
content:
Expand All @@ -99,7 +105,7 @@ components:
deleted:
type: array
items:
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupResponseStructure'
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupResponse'
query_group.get@200:
description: ''
content:
Expand All @@ -110,9 +116,9 @@ components:
query_groups:
type: array
items:
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupResponseStructure'
$ref: '../schemas/query_group._common.yaml#/components/schemas/QueryGroupResponse'
parameters:
query_group.put::path.name:
query_group.update::path.name:
name: name
in: path
description: QueryGroup name.
Expand Down
6 changes: 3 additions & 3 deletions spec/schemas/query_group._common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ info:
paths: {}
components:
schemas:
QueryGroupResponseStructure:
QueryGroupResponse:
type: object
properties:
name:
Expand All @@ -32,7 +32,7 @@ components:
- name
- resiliency_mode
- updatedAt
QueryGroupCreateStructure:
QueryGroupCreate:
type: object
properties:
name:
Expand All @@ -54,7 +54,7 @@ components:
required:
- name
- resiliency_mode
QueryGroupUpdateStructure:
QueryGroupUpdate:
type: object
properties:
resiliency_mode:
Expand Down
Empty file added tests/query_group/index.yaml
Empty file.

0 comments on commit 41b2b46

Please sign in to comment.