Cmed Technology  committed c5d14b4 Draft

make Sphinx see the docstring through a http_method_dispatcher

  • Participants
  • Parent commits 6e36759

Comments (0)

Files changed (1)

File restapiblueprint/lib/

     # Otherwise the flask routing tries to attach every route to the same
     # function (Gotcha!).
     method_dispatcher.__name__ = cls.__name__
+    # Pass on the docstring and fix the source module to make Sphinx work.
+    method_dispatcher.__doc__ = cls.__doc__
+    method_dispatcher.__module__ = cls.__module__
     return method_dispatcher