oasDiscriminator
oasDiscriminator
checks for the correct use of discriminator
values when using polymorphism.
In OpenAPI 2, polymorphism is achieved using discriminator
values, this function checks to ensure correct use.
Example ruleset configuration
oas2-discriminator:
description: "Check for discriminator use in schemas"
type: "validation"
recommended: true
severity: "error"
given: "$"
then:
function: "oas2Discriminator"
The function is used by the oas2-discriminator Rule