Validate that event.type is aligned with event.category#961
Validate that event.type is aligned with event.category#961jsoriano merged 5 commits intoelastic:mainfrom
Conversation
mtojek
left a comment
There was a problem hiding this comment.
I admit that it wasn't easy to go through the logic :) Maybe it's the first symptom to refactor the fields code.
Yeah, this is the first time we need to validate the values of two fields at the same time, this is why I ended up passing the whole document through all the calls chain so when validating one field we can check the value of the other. Two possible alternatives would be:
|
🌐 Coverage report
|
mtojek
left a comment
There was a problem hiding this comment.
Frankly speaking, both propositions are rather hackish. I think that I'd rather keep your current proposal (PR).
Yep, I also prefer the current approach even if not so nice to have to pass the document around. |
|
Integration tests found an issue, After this change I will start with #963. |
Fields like
event.categoryin ECS define a list of allowed values forevent.type, check that these values are aligned.This check is only enabled for packages using at least format version 2.0.0.
Fixes #837.
Part of elastic/package-spec#399.