Skip to content
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

does this extension support flask-restful #28

Open
weiguang-zz opened this issue Oct 21, 2016 · 2 comments
Open

does this extension support flask-restful #28

weiguang-zz opened this issue Oct 21, 2016 · 2 comments

Comments

@weiguang-zz
Copy link

weiguang-zz commented Oct 21, 2016

I want to check that if this extensions support flask-restful, here is my test code:

from flask_autodoc.autodoc import Autodoc
from flask_restful import Resource,Api
class Post(Resource):

    @auto.doc()
    def get(self):
        return 'post'
class Doc(Resource):
    def get(self):
        return auto.html()

api = Api(app)
api.add_resource(Post,'/post')
api.add_resource(Doc,'/doc')

however, the results shows that it does not support the flask-restful api:
image

thanks

zhangzheng

@yingbo
Copy link

yingbo commented Jul 14, 2017

+1

@jwg4
Copy link
Contributor

jwg4 commented Jul 17, 2017

I don't see how this could work. The function Post.get() doesn't by design have any metadata about how it will appear as a HTTP endpoint.

There is simple code which allows you to go through all endpoints which have been added to a Flask app and add documentation for each one. You could use this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants