Skip to content

Commit

Permalink
fix(specs): optional/required query and params (#1864)
Browse files Browse the repository at this point in the history
  • Loading branch information
aallam committed Aug 3, 2023
1 parent ac4ce55 commit c6a7ab4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions specs/recommend/common/schemas/RecommendationsResponse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ recommendHits:
type: array
items:
$ref: '#/recommendHit'
query:
$ref: '../../../common/schemas/SearchParams.yml#/query'
params:
type: string
description: URL-encoded string of all search parameters.
example: query=a&hitsPerPage=20
required:
- hits

Expand Down
16 changes: 8 additions & 8 deletions specs/search/common/schemas/SearchResponse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@ searchHits:
type: array
items:
$ref: 'Hit.yml#/hit'
query:
$ref: '../../../common/schemas/SearchParams.yml#/query'
params:
type: string
description: URL-encoded string of all search parameters.
example: query=a&hitsPerPage=20
required:
- hits
- query
- params

baseSearchResponse:
type: object
Expand All @@ -24,8 +32,6 @@ baseSearchResponse:
- hitsPerPage
- processingTimeMS
- exhaustiveNbHits
- query
- params
properties:
abTestID:
type: integer
Expand Down Expand Up @@ -110,10 +116,6 @@ baseSearchResponse:
example: 20
page:
$ref: '../../../common/schemas/SearchParams.yml#/page'
params:
type: string
description: URL-encoded string of all search parameters.
example: query=a&hitsPerPage=20
redirect:
type: object
description: >
Expand All @@ -131,8 +133,6 @@ baseSearchResponse:
type: integer
description: Time the server took to process the request, in milliseconds.
example: 20
query:
$ref: '../../../common/schemas/SearchParams.yml#/query'
queryAfterRemoval:
type: string
description: Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set.
Expand Down

0 comments on commit c6a7ab4

Please sign in to comment.