Skip to content

Commit c6a7ab4

Browse files
authored
fix(specs): optional/required query and params (#1864)
1 parent ac4ce55 commit c6a7ab4

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

specs/recommend/common/schemas/RecommendationsResponse.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ recommendHits:
1111
type: array
1212
items:
1313
$ref: '#/recommendHit'
14+
query:
15+
$ref: '../../../common/schemas/SearchParams.yml#/query'
16+
params:
17+
type: string
18+
description: URL-encoded string of all search parameters.
19+
example: query=a&hitsPerPage=20
1420
required:
1521
- hits
1622

specs/search/common/schemas/SearchResponse.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,16 @@ searchHits:
1111
type: array
1212
items:
1313
$ref: 'Hit.yml#/hit'
14+
query:
15+
$ref: '../../../common/schemas/SearchParams.yml#/query'
16+
params:
17+
type: string
18+
description: URL-encoded string of all search parameters.
19+
example: query=a&hitsPerPage=20
1420
required:
1521
- hits
22+
- query
23+
- params
1624

1725
baseSearchResponse:
1826
type: object
@@ -24,8 +32,6 @@ baseSearchResponse:
2432
- hitsPerPage
2533
- processingTimeMS
2634
- exhaustiveNbHits
27-
- query
28-
- params
2935
properties:
3036
abTestID:
3137
type: integer
@@ -110,10 +116,6 @@ baseSearchResponse:
110116
example: 20
111117
page:
112118
$ref: '../../../common/schemas/SearchParams.yml#/page'
113-
params:
114-
type: string
115-
description: URL-encoded string of all search parameters.
116-
example: query=a&hitsPerPage=20
117119
redirect:
118120
type: object
119121
description: >
@@ -131,8 +133,6 @@ baseSearchResponse:
131133
type: integer
132134
description: Time the server took to process the request, in milliseconds.
133135
example: 20
134-
query:
135-
$ref: '../../../common/schemas/SearchParams.yml#/query'
136136
queryAfterRemoval:
137137
type: string
138138
description: Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set.

0 commit comments

Comments
 (0)