-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Not compatible with oneOf/anyOf/allOf, not #58
Comments
Ya this is a known limitation, we've hit it as well in our own API testing. It's actually a shortcoming in the underlying parsing library. When I find time to dig on it a bit more I will and update here. |
@bilfeldt OK, I have a branch I'm working on that provides support for However, iIt appears that in order to use |
Dear @hotmeteor thanks for taking the time to look at this. Do you have a branch which I should have a look at? The least I can do is test if this solves the issues I have been facing with this. |
This should be resolved in https://github.com/hotmeteor/spectator/releases/tag/v1.3.0 |
It is possible to use the
oneOf
,anyOf
orallOf
notation in OpenAPI 3.0 Schemas as described in the official documentation here when describing requests/responses, but this causes a problem when trying to compare the schema.The original error was
Now this is caused by src/Validation/RequestValidator.php#L116:
where we also need to check for these type of schemas:
Making this change causes the body to be converted correctly, but the next issue arising is that the
type
property seems to be required as it failed with the validation exception of:It seems that the codebase is not capable of handling the oneOf/anyOf/allOf cases but I have not been able to figure out if this is a quick fix or if the codebase is tightly coupled to the requirement of a
type
.The text was updated successfully, but these errors were encountered: