From 8c915d42c2c281b8f2a203e39db87fdaeb40369a Mon Sep 17 00:00:00 2001 From: Kathleen DeRusso Date: Thu, 14 Sep 2023 10:25:24 -0400 Subject: [PATCH] Update QueryRulesetPutRequest body to better align with REST API --- output/schema/schema.json | 26 ++++++++++++------- output/typescript/types.ts | 4 ++- .../put/QueryRulesetPutRequest.ts | 8 +++--- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index e4ba020c04..20d03dcaa5 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -165976,15 +165976,23 @@ "CommonQueryParameters" ], "body": { - "codegenName": "query_ruleset", - "kind": "value", - "value": { - "kind": "instance_of", - "type": { - "name": "QueryRuleset", - "namespace": "query_ruleset._types" + "kind": "properties", + "properties": [ + { + "name": "rules", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "QueryRule", + "namespace": "query_ruleset._types" + } + } + } } - } + ] }, "description": "Creates or updates a query ruleset.", "inherits": { @@ -166013,7 +166021,7 @@ } ], "query": [], - "specLocation": "query_ruleset/put/QueryRulesetPutRequest.ts#L23-L41" + "specLocation": "query_ruleset/put/QueryRulesetPutRequest.ts#L23-L43" }, { "body": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index a8a8d66348..93c5ab456b 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -15570,7 +15570,9 @@ export interface QueryRulesetListResponse { export interface QueryRulesetPutRequest extends RequestBase { ruleset_id: Id - body?: QueryRulesetQueryRuleset + body?: { + rules: QueryRulesetQueryRule[] + } } export interface QueryRulesetPutResponse { diff --git a/specification/query_ruleset/put/QueryRulesetPutRequest.ts b/specification/query_ruleset/put/QueryRulesetPutRequest.ts index 7259453a2b..89f10cd8e4 100644 --- a/specification/query_ruleset/put/QueryRulesetPutRequest.ts +++ b/specification/query_ruleset/put/QueryRulesetPutRequest.ts @@ -18,7 +18,7 @@ */ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' -import { QueryRuleset } from '../_types/QueryRuleset' +import { QueryRule } from '../_types/QueryRuleset' /** * Creates or updates a query ruleset. @@ -34,8 +34,10 @@ export interface Request extends RequestBase { ruleset_id: Id } /** - * The query ruleset information to update + * The query rules in this ruleset */ /** @codegen_name query_ruleset */ - body: QueryRuleset + body: { + rules: QueryRule[] + } }