-
-
Notifications
You must be signed in to change notification settings - Fork 248
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: ruleset path for Example Object validation #882
Conversation
@johlo Looks pretty cool, thanks! Next to the newly added test
|
The 'example' field has 'Any' values in all contexts it can be used so the rule should not be triggered for that field. The 'examples' field always has values of Example Object type in all contexts, so this is what the rule should trigger on. Changed tests to validate `examples` instead of `example` and added additional tests with multiple examples below the `examples` field.
Done, amended to the old commit. |
btw, when preparing this PR I've only run the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The
example
field hasAny
values in all contextsit can be used so the rule should not be triggered for that field.
The
examples
field always has values ofExample Object
type inall contexts, so this is what the rule should trigger on.
And since the
examples
field takes a map of example objectsthe JSON path expression needs the final
.*
to work.Updated the tests to validate
examples
field instead ofexample
and addedone test.
Checklist
Does this PR introduce a breaking change?