-
Notifications
You must be signed in to change notification settings - Fork 215
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
compatible with swagger 2? #94
Comments
You are on top of our stuff, right now we only support swagger 1.2, which is kind of outdated. but we are building the new version for new versions also. Here's the link to keep you informed (it will be merged soon): https://github.com/flask-restful-swagger/flask-restful-swagger When pasting to online validator, it validates against 2.0 specs. And fails for older ones. |
@sobolevn thanks for your response! is there another way I can figure out what I did wrong then? On the main API page I just see: but when I click "Raw" I see models, APIs, the whole shebang. |
@tommyjcarpenter can you please upload a sceenshot? |
@sobolevn Here are screenshots: http://s16.postimg.org/dgg4webd1/Screen_Shot_2016_03_22_at_8_37_14_AM.png http://s16.postimg.org/tu4ptagw5/Screen_Shot_2016_03_22_at_8_37_19_AM.png First screenshot is the missing swagger endpoints, second is what I see when I click raw. The only thing I did to my project was add
And the example @swagger.operation annotation you have in your readme. |
What happens when you press |
Nothing happens, no errors. The only thing I can see is the url changes to |
Flask logs show all 200s |
A bit hasty to close issues with "invalid" on people trying to use your library there
|
I guess, I have managed to repeat you issue. Here's my json, which I had when the issue was pretty similar to yours: http://pastie.org/10769893 As you can see, it's pretty similar. But, we are missing the Fixed json: http://pastie.org/10769890#15
Does this help? |
Will try it out later, thanks. Yes you had something like ModelClass in the README but I didn't know what that referred to, and later you had ModelClass2, so I just removed those lines. Maybe add a note to the readme that this parameter is required and what ModelClass is. Or maybe add string as a default for |
Thank you, sure. |
Still not seeing the API. My JSON now looks like:
|
I have managed to create the same json, as you have: http://pastie.org/10770850 But, it is working for me. Please, show me the full code you have, maybe the issue is there. |
That is difficult, because this was part of a work application, which I cannot post here. I have switched to https://github.com/gangverk/flask-swagger in the meantime. I will re-read your documentation afterwards. |
When I stub out a new project according to the readme and head to http://localhost:5000/api/spec.html#!/spec, I don't see anything where the dropdown endpoints would show. I'm trying to debug this.
When I click
raw
, I get a json with all of the models and info I added using the decorators. When I paste that JSON into http://editor.swagger.io/#/, I get:Any ideas?
The text was updated successfully, but these errors were encountered: