From 5ea83ab0928489d6d8f45b86542297874cfcd473 Mon Sep 17 00:00:00 2001 From: Hayden Hung Hoang Date: Sun, 7 Dec 2025 22:49:03 +0700 Subject: [PATCH 1/3] fix: synonym item upsert schema does not require `id` --- openapi.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/openapi.yml b/openapi.yml index e1a279d..d0206dd 100644 --- a/openapi.yml +++ b/openapi.yml @@ -502,7 +502,7 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiResponse" - + put: tags: - synonyms @@ -650,7 +650,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/SynonymItemSchema" + $ref: "#/components/schemas/SynonymItemUpsertSchema" required: true responses: "200": @@ -4041,7 +4041,7 @@ components: query_counter_events: { type: integer } doc_log_events: { type: integer } doc_counter_events: { type: integer } - + APIStatsResponse: type: object properties: @@ -4364,15 +4364,11 @@ components: type: string description: ID of the deleted NL search model - SynonymItemSchema: + SynonymItemUpsertSchema: type: object required: - - id - synonyms properties: - id: - type: string - description: Unique identifier for the synonym item synonyms: type: array description: Array of words that should be considered as synonyms @@ -4390,6 +4386,17 @@ components: items: type: string + SynonymItemSchema: + allOf: + - type: object + required: + - id + properties: + id: + type: string + description: Unique identifier for the synonym item + - $ref: "#/components/schemas/SynonymItemUpsertSchema" + SynonymSetCreateSchema: type: object required: From b296d467f08244d2c7f2e0d5c46f02b607434b71 Mon Sep 17 00:00:00 2001 From: Hayden Hung Hoang Date: Sun, 7 Dec 2025 23:06:33 +0700 Subject: [PATCH 2/3] fix: decoupling enum to prevent code-gen generating duplicates --- openapi.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openapi.yml b/openapi.yml index d0206dd..bc0c3bc 100644 --- a/openapi.yml +++ b/openapi.yml @@ -3975,8 +3975,7 @@ components: name: type: string type: - type: string - enum: [popular_queries, nohits_queries, counter, log] + $ref: "#/components/schemas/AnalyticsRuleType" collection: type: string event_type: @@ -4001,6 +4000,9 @@ components: type: string weight: type: integer + AnalyticsRuleType: + type: string + enum: [popular_queries, nohits_queries, counter, log] AnalyticsRuleUpdate: type: object description: Fields allowed to update on an analytics rule From 71ee29ada033c7faa0896649b57d87f24c1afc2d Mon Sep 17 00:00:00 2001 From: Hayden Hung Hoang Date: Sun, 7 Dec 2025 23:12:25 +0700 Subject: [PATCH 3/3] fix description --- openapi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi.yml b/openapi.yml index bc0c3bc..03ab2fe 100644 --- a/openapi.yml +++ b/openapi.yml @@ -1647,7 +1647,7 @@ paths: {"log-slow-requests-time-ms": 2000} responses: '200': - description: Compacting the on-disk database succeeded. + description: Toggle Slow Request Log database succeeded. content: application/json: schema: