I have a set of APIs that were developed using Google Cloud Endpoints. The API methods look something like this:
@endpoints.method(message_types.VoidMessage, SystemAboutResponse, name="about", http_method="GET")
def about(self, request):
"""
Returns some simple information about the APIs.
Example:
...
"""
return SystemAboutResponse(version=API_VERSION)
I would like to use pydoc to generate documentation for the module that contains this method. However, when I do this, the docstring is not preserved due to the use of the endpoints.method decorator.
I have seen answers to other questions that show how to use functools.wraps (e.g. Python decorator handling docstrings) when writing your own decorators so that they will preserve the docstring of decorated methods. Is there some way to do this with Google Cloud Endpoints decorators, since I won't have control over the code for these decorators?