Skip to content

Commit 22bf1c3

Browse files
authored
fix(specs): wrong parameters for searchSynonyms (#852)
1 parent 06727fc commit 22bf1c3

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

specs/search/paths/synonyms/searchSynonyms.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,20 @@ post:
88
description: Search or browse all synonyms, optionally filtering them by type.
99
parameters:
1010
- $ref: '../../../common/parameters.yml#/IndexName'
11-
- $ref: 'common/parameters.yml#/Query'
1211
- $ref: 'common/parameters.yml#/Type'
1312
- $ref: '../../../common/parameters.yml#/PageDefault0'
1413
- $ref: '../../../common/parameters.yml#/HitsPerPage'
14+
requestBody:
15+
description: The body of the the `searchSynonyms` method.
16+
content:
17+
application/json:
18+
schema:
19+
title: searchSynonymsParams
20+
type: object
21+
additionalProperties: false
22+
properties:
23+
query:
24+
$ref: '../../../common/schemas/SearchParams.yml#/query'
1525
responses:
1626
'200':
1727
description: OK
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11
[
22
{
3+
"testName": "searchSynonyms with minimal parameters",
34
"parameters": {
45
"indexName": "indexName"
56
},
67
"request": {
78
"path": "/1/indexes/indexName/synonyms/search",
89
"method": "POST"
910
}
11+
},
12+
{
13+
"testName": "searchSynonyms with all parameters",
14+
"parameters": {
15+
"indexName": "indexName",
16+
"type": "altcorrection1",
17+
"page": 10,
18+
"hitsPerPage": 10,
19+
"searchSynonymsParams": {
20+
"query": "myQuery"
21+
}
22+
},
23+
"request": {
24+
"path": "/1/indexes/indexName/synonyms/search",
25+
"method": "POST",
26+
"body": {
27+
"query": "myQuery"
28+
},
29+
"queryParameters": {
30+
"type": "altcorrection1",
31+
"page": "10",
32+
"hitsPerPage": "10"
33+
}
34+
}
1035
}
1136
]

0 commit comments

Comments
 (0)