-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allOf doesn't work with $ref #51
Comments
|
Failing test is also test, even if it fails by type error. I'll take a look on this, thanks for reporting |
Tried to fix this issue (and am doing so further). The problem exists for all *Of keywords, as the code indicates. A possible solution could be to extend League\OpenAPIValidation\Schema\Validator::validate(), so that it also allows references as second parameter and a possibility to resolve this reference to a schema. |
I thought that all references are resolved on schema loading... |
They do, as i found out, a few minutes ago. By the factories, not by SchemaValidatorTest::loadRawSchema() |
#55 in combination with this tests show, that allOf does work with references. As @scaytrase indicated, the validator isn't responsible for resolving references to schemas. This is done before in the Factories. Then there aren't any references anymore, which the validator has to deal with. |
I've merged tests fix, is this still a problem? |
I don't see a problem anymore. The issue in our project, which was the source for this issue, is already resolved. |
Let me know if problem is still actual |
Whe using
allOf
to compose a reference with a single object, the object is ignored. Futhermore, writing a failing unit test for this issue isn't possible either, because the schema validator requires allallOf
components to be acebe\openapi\spec\Schema
and doesn't allowcebe\openapi\spec\Reference
.The text was updated successfully, but these errors were encountered: