I'm currently documenting a HTTP API using the Sphinx httpdomain
extension. I have a docstring on each request endpoint that documents the argument, query params, return value and exceptions. I would like for this docstring to be used in a Sphinx document.
Currently I used the automethod directive like:
.. automethod:: Controller.method
This will format the docstring including the correct formatting using the httpdomain
, however, it also print the method signature (as it always does.) The result looks somewhat like:
Controller.method()
GET /endpoint_url
Docstring describing the resource.
I basically want it to skip the first line. I found another question on SO similar to this, with a solution to suppress all method signatures. However, this documentation is part of a larger project, and I would like to keep autodoc
functionality as-is for all other autogenerated documentation.