diff --git a/swh/web/api/apidoc.py b/swh/web/api/apidoc.py --- a/swh/web/api/apidoc.py +++ b/swh/web/api/apidoc.py @@ -296,6 +296,7 @@ if not self.noargs: @api_view(['GET', 'HEAD']) + @wraps(f) def doc_view(request): doc_data = self.get_doc_data(f) return make_api_response(request, None, doc_data) diff --git a/swh/web/api/apiurls.py b/swh/web/api/apiurls.py --- a/swh/web/api/apiurls.py +++ b/swh/web/api/apiurls.py @@ -3,6 +3,8 @@ # License: GNU Affero General Public License version 3, or any later version # See top-level LICENSE file for more information +import functools + from rest_framework.decorators import api_view from swh.web.common.urlsindex import UrlsIndex @@ -69,6 +71,7 @@ # create a DRF view from the wrapped function @api_view(self.methods) @throttle_scope(self.throttle_scope) + @functools.wraps(f) def api_view_f(*args, **kwargs): return f(*args, **kwargs) # small hacks for correctly generating API endpoints index doc