Skip to content

Commit 638058e

Browse files
authored
fix(specs): update search api specs [skip-bc] (#3760)
1 parent 1033d8f commit 638058e

File tree

3 files changed

+14
-35
lines changed

3 files changed

+14
-35
lines changed

specs/common/schemas/HighlightResult.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,21 @@ matchLevel:
3434
description: Whether the whole query string matches or only a part.
3535
enum: [none, partial, full]
3636

37-
highlightResultOptionMap:
38-
type: object
39-
description: Surround words that match the query with HTML tags for highlighting.
40-
additionalProperties:
41-
x-additionalPropertiesName: attribute
42-
$ref: '#/highlightResultOption'
43-
44-
highlightResultOptionArray:
37+
highlightResultArray:
4538
type: array
4639
description: Surround words that match the query with HTML tags for highlighting.
4740
items:
48-
$ref: '#/highlightResultOption'
49-
50-
highlightResult:
51-
oneOf:
52-
- $ref: '#/highlightResultMap'
53-
- $ref: '#/highlightResultOption'
54-
- $ref: '#/highlightResultOptionMap'
55-
- $ref: '#/highlightResultOptionArray'
41+
$ref: '#/highlightResult'
5642

5743
highlightResultMap:
5844
type: object
5945
description: Surround words that match the query with HTML tags for highlighting.
6046
additionalProperties:
6147
x-additionalPropertiesName: attribute
6248
$ref: '#/highlightResult'
49+
50+
highlightResult:
51+
oneOf:
52+
- $ref: '#/highlightResultOption'
53+
- $ref: '#/highlightResultMap'
54+
- $ref: '#/highlightResultArray'

specs/common/schemas/SearchResponse.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,3 @@ SearchPagination:
208208
$ref: '#/nbPages'
209209
hitsPerPage:
210210
$ref: './IndexSettings.yml#/hitsPerPage'
211-
required:
212-
- page
213-
- nbHits
214-
- nbPages
215-
- hitsPerPage

specs/common/schemas/SnippetResult.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,21 @@ snippetResultOption:
1313
x-discriminator-fields:
1414
- matchLevel
1515

16-
snippetResultOptionMap:
16+
snippetResultMap:
1717
type: object
1818
description: Snippets that show the context around a matching search query.
1919
additionalProperties:
2020
x-additionalPropertiesName: attribute
21-
$ref: '#/snippetResultOption'
21+
$ref: '#/snippetResult'
2222

23-
snippetResultOptionArray:
23+
snippetResultArray:
2424
type: array
2525
description: Snippets that show the context around a matching search query.
2626
items:
27-
$ref: '#/snippetResultOption'
27+
$ref: '#/snippetResult'
2828

2929
snippetResult:
3030
oneOf:
31-
- $ref: '#/snippetResultMap'
3231
- $ref: '#/snippetResultOption'
33-
- $ref: '#/snippetResultOptionMap'
34-
- $ref: '#/snippetResultOptionArray'
35-
36-
snippetResultMap:
37-
type: object
38-
description: Snippets that show the context around a matching search query.
39-
additionalProperties:
40-
x-additionalPropertiesName: attribute
41-
$ref: '#/snippetResult'
32+
- $ref: '#/snippetResultMap'
33+
- $ref: '#/snippetResultArray'

0 commit comments

Comments
 (0)