From 41b2b4660ca6d5723b789a37e1b9b5d054a6b3b2 Mon Sep 17 00:00:00 2001 From: Ruirui Zhang Date: Mon, 24 Jun 2024 14:07:37 -0700 Subject: [PATCH] modify query_group spec Signed-off-by: Ruirui Zhang --- spec/namespaces/query_group.yaml | 46 +++++++++++++++------------ spec/schemas/query_group._common.yaml | 6 ++-- tests/query_group/index.yaml | 0 3 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 tests/query_group/index.yaml diff --git a/spec/namespaces/query_group.yaml b/spec/namespaces/query_group.yaml index 74fb7c1d1..74b0a5b9f 100644 --- a/spec/namespaces/query_group.yaml +++ b/spec/namespaces/query_group.yaml @@ -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 @@ -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 @@ -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: @@ -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: @@ -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. diff --git a/spec/schemas/query_group._common.yaml b/spec/schemas/query_group._common.yaml index ee6d4052d..d11e20db9 100644 --- a/spec/schemas/query_group._common.yaml +++ b/spec/schemas/query_group._common.yaml @@ -6,7 +6,7 @@ info: paths: {} components: schemas: - QueryGroupResponseStructure: + QueryGroupResponse: type: object properties: name: @@ -32,7 +32,7 @@ components: - name - resiliency_mode - updatedAt - QueryGroupCreateStructure: + QueryGroupCreate: type: object properties: name: @@ -54,7 +54,7 @@ components: required: - name - resiliency_mode - QueryGroupUpdateStructure: + QueryGroupUpdate: type: object properties: resiliency_mode: diff --git a/tests/query_group/index.yaml b/tests/query_group/index.yaml new file mode 100644 index 000000000..e69de29bb