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

Introduce "external" property for fields #179

Merged
merged 6 commits into from
Jun 10, 2021
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
2 changes: 1 addition & 1 deletion code/go/internal/spec/statik.go

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions test/packages/good/data_stream/foo/fields/external-fields.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- name: event
type: group
description: Event family
fields:
- name: category
external: ecs
5 changes: 4 additions & 1 deletion versions/1/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,7 @@
link: https://github.com/elastic/package-spec/pull/176
- description: Validate if field groups don't have units and metric types defined
type: enhancement
link: https://github.com/elastic/package-spec/pull/183
link: https://github.com/elastic/package-spec/pull/183
- description: Introduce "reference" property for fields
type: enhancement
link: https://github.com/elastic/package-spec/pull/179
8 changes: 6 additions & 2 deletions versions/1/data_stream/fields/fields.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,13 @@ spec:
type: string
examples:
- '^[a-zA-Z]$'
external:
description: External source reference
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, both names are in here 🤦 source and reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option:

external: ecs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I renamed to external.

type: string
enum:
- ecs
fields:
description: Sub-fields, when type is group
$ref: "#" # JSON-schema syntax for pointing to the root of the schema
required:
- name
- type
- name