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

fix: strict unmarshalling #71

Merged
merged 3 commits into from
Jul 12, 2024
Merged

fix: strict unmarshalling #71

merged 3 commits into from
Jul 12, 2024

Conversation

FUSAKLA
Copy link
Owner

@FUSAKLA FUSAKLA commented Jul 11, 2024

/fixes #68

Adds a workaround for missing KnownFields option when using Node.Decode as described in yaml feaature request here go-yaml/yaml#460

It is hacky, but unfortunately I see no better way to do this :/

Signed-off-by: Martin Chodur m.chodur@seznam.cz

FUSAKLA added 2 commits July 12, 2024 01:16
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
@FUSAKLA FUSAKLA force-pushed the fus-strict-unmarshall branch from f9ca46d to e9b577a Compare July 11, 2024 23:17
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
@FUSAKLA
Copy link
Owner Author

FUSAKLA commented Jul 12, 2024

After the fix group with field foo: bar returns an arror like

Result: 
  File: examples/rules/rules.yaml - INVALID
    - invalid file examples/rules/rules.yaml: unknown field "foo" when unmarshalling the *unmarshaler.RuleGroup, only supported fields are: name,interval,query_offset,partial_response_strategy,source_tenants,rules,limit

@FUSAKLA FUSAKLA merged commit 9af9c56 into master Jul 12, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support strict unmarshalling of the yaml files
1 participant