acoomans / flask-autodoc

Flask autodoc automatically creates an online documentation for your flask application.
MIT License
98 stars 49 forks source link

Addition if you don't want to have to decorate all flask funcs #1

Closed utilitarianexe closed 9 years ago

utilitarianexe commented 10 years ago
direct_decorate = auto.doc()
for func  in app.view_functions.values():
    direct_decorate(func)
acoomans commented 10 years ago

I can't make this work. Do you have a full example of this? I'll be glad to add it to the readme

lukeyeager commented 9 years ago

@utilitarianexe, can you verify that this works:

for endpoint, function in app.view_functions.iteritems():
    app.view_functions[endpoint] = auto.doc()(function)

(see more detail at #19)

utilitarianexe commented 9 years ago

Sorry for the late response. I do not have the code I used this on anymore because I changed companies. Would be happy to whip up some foobar code tomorrow to verify it on if that would be useful to you.

lukeyeager commented 9 years ago

Don't worry about it, it seems like that solution is working (see #20). I'm just trying to address all open issues. Please close this if you're satisfied.