Skip to content
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

fix(specs): update search api specs [skip-bc] #3760

Merged
merged 2 commits into from
Sep 16, 2024
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
24 changes: 8 additions & 16 deletions specs/common/schemas/HighlightResult.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,21 @@ matchLevel:
description: Whether the whole query string matches or only a part.
enum: [none, partial, full]

highlightResultOptionMap:
type: object
description: Surround words that match the query with HTML tags for highlighting.
additionalProperties:
x-additionalPropertiesName: attribute
$ref: '#/highlightResultOption'

highlightResultOptionArray:
highlightResultArray:
type: array
description: Surround words that match the query with HTML tags for highlighting.
items:
$ref: '#/highlightResultOption'

highlightResult:
oneOf:
- $ref: '#/highlightResultMap'
- $ref: '#/highlightResultOption'
- $ref: '#/highlightResultOptionMap'
- $ref: '#/highlightResultOptionArray'
$ref: '#/highlightResult'

highlightResultMap:
type: object
description: Surround words that match the query with HTML tags for highlighting.
additionalProperties:
x-additionalPropertiesName: attribute
$ref: '#/highlightResult'

highlightResult:
oneOf:
- $ref: '#/highlightResultOption'
- $ref: '#/highlightResultMap'
- $ref: '#/highlightResultArray'
5 changes: 0 additions & 5 deletions specs/common/schemas/SearchResponse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,3 @@ SearchPagination:
$ref: '#/nbPages'
hitsPerPage:
$ref: './IndexSettings.yml#/hitsPerPage'
required:
- page
- nbHits
- nbPages
- hitsPerPage
20 changes: 6 additions & 14 deletions specs/common/schemas/SnippetResult.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,21 @@ snippetResultOption:
x-discriminator-fields:
- matchLevel

snippetResultOptionMap:
snippetResultMap:
type: object
description: Snippets that show the context around a matching search query.
additionalProperties:
x-additionalPropertiesName: attribute
$ref: '#/snippetResultOption'
$ref: '#/snippetResult'

snippetResultOptionArray:
snippetResultArray:
type: array
description: Snippets that show the context around a matching search query.
items:
$ref: '#/snippetResultOption'
$ref: '#/snippetResult'

snippetResult:
oneOf:
- $ref: '#/snippetResultMap'
- $ref: '#/snippetResultOption'
- $ref: '#/snippetResultOptionMap'
- $ref: '#/snippetResultOptionArray'

snippetResultMap:
type: object
description: Snippets that show the context around a matching search query.
additionalProperties:
x-additionalPropertiesName: attribute
$ref: '#/snippetResult'
- $ref: '#/snippetResultMap'
- $ref: '#/snippetResultArray'
Loading