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
nodejs generator : /docs doesnt show all operations #652
Comments
@Cooker-Monster - how do you run the sample? Notice it says at the top that you need to use |
@webron : thx for the answer
|
So basically this is a duplicate of #667? |
maybe or maybe not !
|
But do you see those operations generated? Because if not, it's no wonder they are not visible. |
Yes, they are generated ... it's just the link between function and path this is not done ... |
Can you share the output of |
I don't catch it, sorry : ther is no /api-docs available (only /docs) ! |
Looking at your screenshot, it says |
yes but this is not relevant. anyway, api-docs/user or User gives "Cant' read swagger JSON from http://localhost:8080/api-docs/User" |
Going further, I have set debug to see what's going on (hope it will help !). Let's focus on User Paths & Controler (for practical reason) :
This is the middleware init steps full log : but when I try DELETE and GET operations on /users/{username}, as it could be seen in UI, only DELETE is available (GET handler is missing) << So, yes, the behavior seen in UI have the same origin as the routing problem into the code. |
@webron : I know why !!! |
@Cooker-Monster - can you clarify? Do you see the issue from the code generated by the codegen for nodejs or something else? |
@webron: yes, the issue is located in codegen nodejs and to be more precise in NodeJSServerCodegen Java Class which uses swagger.mustache template to create api/swagger.json file. api/swagge.json is wrong. This is not an issue in Swagger tools as it was one of hypothesis ... |
Got it, thanks. |
You're welcome ! I'll dig to create a coffeescript generator for my needs ... wondering if it's valuable ? |
Sure, anything could be great. |
Hi all, Hugo (https://github.com/hgwood) and I worked on a fix for this issue. We created a PR for the fix: #1037. Feel free to make us your comments! |
Fix swagger.json supporting file for the node.js server (fixes #652)
Hi all and thanks for this great job !,
I know that embeded generators are in alpha stage but I have just noticed the following behavior :
with nodejs generated code, UI (with /docs) shows only the last operation for each path.
for exemple :
the unique operation shown will be the PUT
Thx !
The text was updated successfully, but these errors were encountered: