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

Allow to define expected values in fields definitions #616

Merged
merged 2 commits into from
Sep 27, 2023
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
4 changes: 2 additions & 2 deletions spec/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
link: https://github.com/elastic/package-spec/pull/607
- version: 2.12.1-next
changes:
- description: Prepare for next version
- description: Allow to define expected values in fields definitions.
type: enhancement
link: https://github.com/elastic/package-spec/pull/612
link: https://github.com/elastic/package-spec/pull/616
- description: Add support for structured errors
type: enhancement
link: https://github.com/elastic/package-spec/pull/609
Expand Down
6 changes: 6 additions & 0 deletions spec/integration/data_stream/fields/fields.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ spec:
description: Short description of field
type: string

expected_values:
description: An array of expected values for the field. When defined, these are the only expected values.
type: array
items:
type: string

value:
description: The value to associate with a constant_keyword field.
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,8 @@
metrics:
- min
- max
- name: enum
type: keyword
expected_values:
- artifact
- directory