zally icon indicating copy to clipboard operation
zally copied to clipboard

Discriminator property is not validated

Open topicus opened this issue 7 years ago • 1 comments

Related with #321

Accordingly with the OpenAPI spec when you define a discriminator the name should be in the schema and must be required:

discriminator | string | Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it.

Should this trigger a parse error?

Acceptance criteria

  • [ ] The property name used MUST be defined at this schema
  • [ ] The property name used MUST be required
  • [ ] Violation error should be shown

topicus avatar Sep 20 '17 11:09 topicus

This is a great candidate for a Zally Check! Feel free to propose a corresponding change to the API Guidelines.

maxim-tschumak avatar Sep 20 '17 12:09 maxim-tschumak