Skip to content

Commit 59cc7ec

Browse files
authored
Search API V3: fix view description (#9828)
The description from https://docs.readthedocs.io/_/api/v3/search/ doesn't match the one from https://readthedocs.org/api/v3/search/ because we are subclassing the view.
1 parent 12424d1 commit 59cc7ec

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

readthedocs/search/api/v3/views.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ class SearchAPI(APIv3Settings, GenericAPIView):
5858
# So we need to increase the rate limit.
5959
throttle_classes = (SearchUserRateThrottle, SearchAnonRateThrottle)
6060

61+
@property
62+
def description(self):
63+
"""
64+
Get the view description.
65+
66+
Force the description to always be the docstring of this class,
67+
even if it's subclassed.
68+
"""
69+
return SearchAPI.__doc__
70+
6171
def get_view_name(self):
6272
return "Search API V3"
6373

0 commit comments

Comments
 (0)