membrane-php / membrane-core

Membrane is a general purpose input validation library, supports both PHP Attributes and OpenAPI specifications
Other
1 stars 2 forks source link

Handle schemas with top level definitions AND complex schemas #179

Open charjr opened 4 months ago

charjr commented 4 months ago

Related to #180 and will likely be fixed with the same change.

Currently it is assumed that if any xOf is present, then the top level schema is empty.

This may not always be the case, currently we would not handle a schema like this:

schema:
  type: string,
  allOf:
    ...

Membrane would see the allOf and ignore the top level schema, treating it like this:

schema:
  allOf:
    ...