-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Library does not support 'oneOf', 'anyOf', 'allOf' and 'not' #51
Comments
Hi, I saw there's a (partial) fix for this in the plusForta/php-swagger-test fork. Edit: that patch is a very naive implementation that doesn't actually work for nested references. |
I am planning moving on this until the end of the month. But any help is appreciate. Another interesting point: if we see some fork with a cool feature anyone can suggest a PR and we'll analyse with care 👍 |
Sounds great! At this point I can't offer code assistance but once it's out on some dev branch I can test it against my codebase since I have already incorporated the library and I have particular test cases that fail now and should pass when it works. |
Just encountered this issue today as well. I'm very in favour of getting that PR'd in otherwise I won't be able to use the assertRequest for any of my Schema's 😭 |
I sent a message since april to the PR owner and I didn't get any answer yet. So, I'll implement by myself then. |
I merged his PR. I still have to add unit test before integrate to the main branch. If you can produce any swagger.json with these use cases I'd appreaciate and will make it faster. Here the instructions to use the dev branch: |
I'm actually using this via a laravel wrapper https://dev.saythanks.app/api/documentation I forked the wrapper and pushed through the 3.1.1.x-dev version. All my auth tests are working 🚀 |
https://gist.github.com/JohnRoux/9a85c2b7a98d4e5bc1a3a6a45434f244 That's how I'm using it at the moment. |
Awesome! This will help a lot. |
For sure, scream if I can help at all 👍 |
Can I add your swagger implementation into the project? |
Ummm, it is a private project still, let me rather generate a fresh example doc for you with some of the specifics taken out. |
I can't promise that this is great or even good 😅 https://gist.github.com/JohnRoux/d2e3963e29c040b3b503675ea95d89af |
I'll use this to create the unit tests. Thanks :) |
Bearer of bad news :( Context: When running the response validation, I get this error: So it's clearly found the deepest "allOf" and is trying to match the whole object against that. :( I think the |
hi, in our use cases our implementation of allOf works (mentioned in laravel-wrapper), did not have the time to make PR - should i make the time? |
Yeah please! |
P.S. a note that enums fall under the same error For example:
|
Ok, I'try to make the time today and send PR 👍 |
Any update on this topic? |
The implementation was complete, but still some fixes to do. I have this PR: #67 to test. I would be glad if you could help me to test it. |
@kachar Could you please provide more details or some examples? As I know, |
I'll try to setup a testcase, thanks for the update |
Just to let you know that your library does not support
oneOf
,anyOf
,allOf
andnot
tags.More information: https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/
The text was updated successfully, but these errors were encountered: