elastic / elastic/package-spec
[Change Proposal] Relax validations on required fields
- Dominant language
- Go
- Stars
- 20
- Forks
- 93
- Avg merge
- 15h 10m
- Merged PRs (30d)
- 12
Description
We currently check at the spec level that some fields are required, here: https://github.com/elastic/package-spec/blob/5325b7e43d4b49cd6fdb90aa24705095911211e6/code/go/internal/validator/semantic/validate_required_fields.go#L14-L25
The definition of these fields is already provided in many cases by `ecs@mappings`, and its definition doesn't grant that they are correctly used, this can be only checked with system tests. Current implementation forces packages developers to include this boilerplate fields.
So maybe we should remove the expectation on these fields from the spec, and ensure that `elastic-package` can detect misuses or absence of these fields.
Contributor guide
Assessment
This issue has not been assessed yet.