django-rest-framework-docs
django-rest-framework-docs copied to clipboard
DocString Formatting for Description
How do I format the description of an endpoint for when DRF Docs displays it? I've tried several things and nothing works. For example, I'd like to add line breaks. Is there a way to do this? Thanks
Did you ever find a solution to this? I am very interested...
No, not yet. :(
I did come across these threads...
https://github.com/manosim/django-rest-framework-docs/pull/117
http://www.django-rest-framework.org/topics/documenting-your-api/
supposedly if you have markdown installed you can use markdown in the docstrings of your api... I haven't tried using it yet but I hope this is still relevant to you!
Hello! Any solution to this? I'm stuck at the same point :(
Turns out the version available in pip repos is older and still does not support description markdown formatting.
To enable it you have to download the latest version from git and install it manually.
git clone https://github.com/manosim/django-rest-framework-docs.git
pip install -r django-rest-framework-docs/requirements.txt
pip install -e django-rest-framework-docs/
Note that django-rest-framework-docs/requirements.txt contains:
Django==1.8.7
djangorestframework==3.3.2
If you have different versions of Django or djangorestframework you can remove them.
@mytrhan, I tried ur method, didn't work.