swaggest / php-json-schema

High definition PHP structures with JSON-schema based validation
MIT License
446 stars 50 forks source link

Fail validation on invalid reference exception #121

Closed vearutop closed 3 years ago

vearutop commented 3 years ago

When $ref is a part of 3rd-party schema, e.g. Swagger it is not always clear whether it is a reference, or just a string property that happens to have a name $ref. Because of such ambiguity schema validation was tolerating validation failures that are happening in a 3rd-party referenced schema.

This PR makes validation stricter, so that reference resolution failure would fail validation.

Related to https://github.com/swaggest/php-swagger2-schema/issues/8.