Skip to content

Commit 9efb818

Browse files
authored
Merge pull request #108 from haydenhoang/master
fix: prevent generating duplicate enums & correct schema for synonym item upsert
2 parents 05c5e35 + 71ee29a commit 9efb818

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

openapi.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ paths:
502502
application/json:
503503
schema:
504504
$ref: "#/components/schemas/ApiResponse"
505-
505+
506506
put:
507507
tags:
508508
- synonyms
@@ -650,7 +650,7 @@ paths:
650650
content:
651651
application/json:
652652
schema:
653-
$ref: "#/components/schemas/SynonymItemSchema"
653+
$ref: "#/components/schemas/SynonymItemUpsertSchema"
654654
required: true
655655
responses:
656656
"200":
@@ -1647,7 +1647,7 @@ paths:
16471647
{"log-slow-requests-time-ms": 2000}
16481648
responses:
16491649
'200':
1650-
description: Compacting the on-disk database succeeded.
1650+
description: Toggle Slow Request Log database succeeded.
16511651
content:
16521652
application/json:
16531653
schema:
@@ -3975,8 +3975,7 @@ components:
39753975
name:
39763976
type: string
39773977
type:
3978-
type: string
3979-
enum: [popular_queries, nohits_queries, counter, log]
3978+
$ref: "#/components/schemas/AnalyticsRuleType"
39803979
collection:
39813980
type: string
39823981
event_type:
@@ -4001,6 +4000,9 @@ components:
40014000
type: string
40024001
weight:
40034002
type: integer
4003+
AnalyticsRuleType:
4004+
type: string
4005+
enum: [popular_queries, nohits_queries, counter, log]
40044006
AnalyticsRuleUpdate:
40054007
type: object
40064008
description: Fields allowed to update on an analytics rule
@@ -4041,7 +4043,7 @@ components:
40414043
query_counter_events: { type: integer }
40424044
doc_log_events: { type: integer }
40434045
doc_counter_events: { type: integer }
4044-
4046+
40454047
APIStatsResponse:
40464048
type: object
40474049
properties:
@@ -4364,15 +4366,11 @@ components:
43644366
type: string
43654367
description: ID of the deleted NL search model
43664368

4367-
SynonymItemSchema:
4369+
SynonymItemUpsertSchema:
43684370
type: object
43694371
required:
4370-
- id
43714372
- synonyms
43724373
properties:
4373-
id:
4374-
type: string
4375-
description: Unique identifier for the synonym item
43764374
synonyms:
43774375
type: array
43784376
description: Array of words that should be considered as synonyms
@@ -4390,6 +4388,17 @@ components:
43904388
items:
43914389
type: string
43924390

4391+
SynonymItemSchema:
4392+
allOf:
4393+
- type: object
4394+
required:
4395+
- id
4396+
properties:
4397+
id:
4398+
type: string
4399+
description: Unique identifier for the synonym item
4400+
- $ref: "#/components/schemas/SynonymItemUpsertSchema"
4401+
43934402
SynonymSetCreateSchema:
43944403
type: object
43954404
required:

0 commit comments

Comments
 (0)