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

Add type for highlight field #41

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
28 changes: 27 additions & 1 deletion openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,12 @@ components:
highlight:
type: object
description: Highlighted version of the matching document
additionalProperties: true
additionalProperties:
oneOf:
- $ref: "#/components/schemas/SearchHighlightV2"
- type: array
items:
$ref: "#/components/schemas/SearchHighlightV2"
document:
type: object
description: Can be any key-value pair
Expand Down Expand Up @@ -1534,6 +1539,27 @@ components:
items:
type: object
x-go-type: "interface{}"
SearchHighlightV2:
type: object
required:
- snippet
- matched_tokens
properties:
snippet:
type: string
description: The highlighted snippet
example: <mark>Stark</mark> Industries
value:
type: string
description: Full field value with highlighting
example: <mark>Stark</mark> Industries is a major supplier of space equipment.
matched_tokens:
type: array
description: The matching tokens in the field value
items:
type: string
example:
- Stark
SearchOverrideSchema:
type: object
required:
Expand Down