-
-
Notifications
You must be signed in to change notification settings - Fork 222
bug: multiple specs are not working #538
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
Comments
after some debugging I got it working removing this block:
it seems every schema enters lookupRoute:
|
@dnalborczyk i added some new multi-spec tests. the tests essentially replicate the example 2 multi-spec. the tests succeed. one key difference is that the tests do not use operation handlers. i wonder if this issue is specific to operation handlers? would you mind modifying example 2 with a route or two from your spec. if it works, then I'll know the issue is related to operation handlers. |
@cdimascio thank you for looking into this!
yes, absolutely! I'll have a look tomorrow and report back. 👍 |
@cdimascio I added a (failing) multi spec test: #552 based on your other multi spec test. notice that this test is not using any server url:
|
I'm currently facing the same issue. Is there any update? |
It fails also with v5, and it's not related to the usage of operationHandlers. I fixed it simply by using one middleware per route, changing this in the docs example:
|
I'm facing the same issue when applying multiple specs. |
I had the same as well, loading it the way @juanda99 did, also did not fix it for me. It works for the first set of routers that I pass with app.use(someRouterInstance) What is interesting is that when I did It actually works more or less. The requests get validated but the responses do not. What I also think is very interesting is that when I add "/api", I can seem to use a relative path like this ./../../api-definitions ... However when I do not use "/api", it is not able to find it this way |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
applying multiple specs to
middleware
does not seem to be supported. only the very first applied spec is working.I found this issue, but it applied to a previous version of this project, and indicated it should have been fixed:
#281
To Reproduce
Actual behavior
only first (spec1) spec is known and maps operation handlers.
Expected behavior
both specs should map operation handlers.
Examples and context
The text was updated successfully, but these errors were encountered: