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
Are Blueprint supported ? #33
Comments
Sorry, don't use Blueprints so I don't know... If Blueprints end up resolving to views then probably yes. |
Yes. When calling swagger(), you can use the prefix arg and set it to the same you set url_prefix when defining your blueprint to limit the spec to said blueprint. e.g:
In some other file:
|
Awesome! Thanks. I'll leave the ticket open to remind me to update the docs |
I don't see support for the 'prefix' keyword arg in the 'swagger' function. Has it been removed? |
It was never there. Possibly @alejoar has a fork that added this? Anyways, if all you want to do is prefix the paths I think it would be better to update basePath in the swagger response.
|
Great suggestion, these are my first Swagger experiments, so your comment is quite helpful, tx! |
Any update on blueprint document update thing ? waiting for it. |
@atlithorn @jjmurre All I did is a very simple modification you can see here. Basically, if the prefix argument is present, it ignores all other url rules:
I can create a pull request with this modification if there's interest. I already made another pull request (for a different feature) but it has been ignored for now. Edit: Ended up submitting a new pull request. |
Thanks @alejoar, merged. I'll try to get a release out asap |
Hi,
I have a Flask app using Blueprints and would like to document the API using swagger. I love the idea of having a single source of truth when it comes to the API documentation and hence would like to use flask-swagger.
Does it support Blueprint ?
I must admit I didn't even try, I was hoping to first get some tips before messing around with my docstrings everywhere....
thanks
Brieuc
The text was updated successfully, but these errors were encountered: