Skip to content

Commit

Permalink
fix(specs): update search api specs [skip-bc] (#3760)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluf22 authored Sep 16, 2024
1 parent 1033d8f commit 638058e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 35 deletions.
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'

0 comments on commit 638058e

Please sign in to comment.