elastic / elastic/package-spec

[Change Proposal] Relax validations on required fields

Open
#843 0 comments 1 reaction 0 assignees View on GitHub
discuss
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.