Skip to content

fix(specs): make hits required, facets count as an integer, searchParams as optional #868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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