Skip to content

Commit

Permalink
fix(specs): make hits required, facets count as an integer, `sear…
Browse files Browse the repository at this point in the history
…chParams` as optional (#868)
  • Loading branch information
shortcuts authored Jul 27, 2022
1 parent bdef794 commit 6bdc94f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
2 changes: 2 additions & 0 deletions specs/recommend/common/schemas/RecommendationsResponse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ recommendHits:
type: array
items:
$ref: '#/recommendHit'
required:
- hits

recommendHit:
type: object
Expand Down
7 changes: 4 additions & 3 deletions specs/search/common/schemas/SearchResponse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ searchHits:
type: array
items:
$ref: 'Hit.yml#/hit'
required:
- hits

baseSearchResponse:
type: object
additionalProperties: false
required:
- hits
- nbHits
- page
- nbPages
Expand All @@ -47,7 +48,7 @@ baseSearchResponse:
description: If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID.
abTestVariantID:
type: integer
description: If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used.
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).
aroundLatLng:
type: string
description: The computed geo location.
Expand All @@ -70,7 +71,7 @@ baseSearchResponse:
additionalProperties:
type: object
additionalProperties:
type: string
type: integer
description: A mapping of each facet name to the corresponding facet counts.
example:
category:
Expand Down
1 change: 0 additions & 1 deletion specs/search/paths/search/searchSingleIndex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ post:
parameters:
- $ref: '../../../common/parameters.yml#/IndexName'
requestBody:
required: true
content:
application/json:
schema:
Expand Down
12 changes: 3 additions & 9 deletions tests/CTS/methods/requests/search/searchSingleIndex.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@
{
"testName": "search with minimal parameters",
"parameters": {
"indexName": "indexName",
"searchParams": {
"query": "myQuery"
}
"indexName": "indexName"
},
"request": {
"path": "/1/indexes/indexName/query",
"method": "POST",
"body": {
"query": "myQuery"
}
"method": "POST"
}
},
{
"method": "search",
"testName": "search with facetFilters",
"testName": "search with searchParams",
"parameters": {
"indexName": "indexName",
"searchParams": {
Expand Down

0 comments on commit 6bdc94f

Please sign in to comment.