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 @@ -290,6 +290,7 @@ if not noargs: @api_view(['GET', 'HEAD']) + @wraps(f) def doc_view(request): doc_data = get_doc_data(f, route, noargs) 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 @@ -63,6 +65,7 @@ # create a DRF view from the wrapped function @api_view(methods) @throttling.throttle_scope(throttle_scope) + @functools.wraps(f) def api_view_f(*args, **kwargs): return f(*args, **kwargs) # small hacks for correctly generating API endpoints index doc