enumeration
enumeration will check that the enum values in a property, match the configured ones as a part of the rule.
How do I use this function?
This function is configured by the following functionOptions
. Essentially the values
is a comma separated list
of all the things you want to check against.
NAME | TYPE | REQUIRED? | DESCRIPTION |
---|---|---|---|
values | string |
yes | Comma separated values to check against |
Example ruleset configuration
check-values:
description: "Check the required values exist"
type: style
recommended: true
given: $.paths.operations[*].tags
then:
field:
function: "enumeration"
functionOptions:
values: "must, be, one, of, these, things, here"