Skip to content

Commit 6bdc94f

Browse files
authored
fix(specs): make hits required, facets count as an integer, searchParams as optional (#868)
1 parent bdef794 commit 6bdc94f

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

specs/recommend/common/schemas/RecommendationsResponse.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ recommendHits:
1111
type: array
1212
items:
1313
$ref: '#/recommendHit'
14+
required:
15+
- hits
1416

1517
recommendHit:
1618
type: object

specs/search/common/schemas/SearchResponse.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ searchHits:
2626
type: array
2727
items:
2828
$ref: 'Hit.yml#/hit'
29+
required:
30+
- hits
2931

3032
baseSearchResponse:
3133
type: object
3234
additionalProperties: false
3335
required:
34-
- hits
3536
- nbHits
3637
- page
3738
- nbPages
@@ -47,7 +48,7 @@ baseSearchResponse:
4748
description: If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID.
4849
abTestVariantID:
4950
type: integer
50-
description: If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used.
51+
description: If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used (starting at 1).
5152
aroundLatLng:
5253
type: string
5354
description: The computed geo location.
@@ -70,7 +71,7 @@ baseSearchResponse:
7071
additionalProperties:
7172
type: object
7273
additionalProperties:
73-
type: string
74+
type: integer
7475
description: A mapping of each facet name to the corresponding facet counts.
7576
example:
7677
category:

specs/search/paths/search/searchSingleIndex.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ post:
99
parameters:
1010
- $ref: '../../../common/parameters.yml#/IndexName'
1111
requestBody:
12-
required: true
1312
content:
1413
application/json:
1514
schema:

tests/CTS/methods/requests/search/searchSingleIndex.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,16 @@
22
{
33
"testName": "search with minimal parameters",
44
"parameters": {
5-
"indexName": "indexName",
6-
"searchParams": {
7-
"query": "myQuery"
8-
}
5+
"indexName": "indexName"
96
},
107
"request": {
118
"path": "/1/indexes/indexName/query",
12-
"method": "POST",
13-
"body": {
14-
"query": "myQuery"
15-
}
9+
"method": "POST"
1610
}
1711
},
1812
{
1913
"method": "search",
20-
"testName": "search with facetFilters",
14+
"testName": "search with searchParams",
2115
"parameters": {
2216
"indexName": "indexName",
2317
"searchParams": {

0 commit comments

Comments
 (0)