kev-409 Extend json validation for probes#412
Conversation
4b29aa3 to
c2cc411
Compare
ezodude
left a comment
There was a problem hiding this comment.
Would appreciate feedback on comment.
marcinc
left a comment
There was a problem hiding this comment.
Left a few comments. Should this PR also address the dependent config fields validations, based on selected probe type?
ezodude
left a comment
There was a problem hiding this comment.
All good - minor typos and such...
34602fa to
d7ee773
Compare
pkg/kev/services.go
Outdated
| return func(re gojsonschema.ResultError) bool { | ||
| for _, t := range ts { | ||
| if t == re.Type() { | ||
| return true |
There was a problem hiding this comment.
as you exclude I guess this should return false, and true by default otherwise?
There was a problem hiding this comment.
Otherwise, it makes sense. 👌
As a final nice to have, it would be great if we can move the schema logic into a separate file if possible.
There was a problem hiding this comment.
yep, this is why the build was failing, it's fixed now. Do you think this is more clear/easier to understand without a lot of context?
There was a problem hiding this comment.
also I agree with this not being the right place for this but is there a good place? Is it going to be re-used somewhere else? I wonder if this would make sense as a contribution to the upstream repo
No description provided.