Validation of schemas using allOf

Issue #313 duplicate
Tore Fjellheim created an issue

I am trying to validate an OpenAPI schema where we’re using allOf as an inheritance mechanism so that we can have a basic address object, and then a separate company address object that contains more details. The company address object contains all the fields from the address object plus things like company support phone.

When using allOf, the validation fails with the reasons in the pull request listed here:

https://bitbucket.org/atlassian/swagger-request-validator/pull-requests/16/24-json-schema-composition-allof-with/diff#chg-swagger-request-validator-core/README.md

The suggested solution works for us, but it seems odd to me that I need to put in a IGNORE flag into a classpath file to make this work. My understanding is that the allOf mechanism means that an object can contain all of the elements in both together. Should not the validation have been fixed so that the elements under allOf are combined first and then validated as a single entity?

Comments (2)

  1. Log in to comment