clean up API markdown docs

This commit is contained in:
Ryan Petrello
2018-02-02 13:00:54 -05:00
parent 57c22c20b2
commit ac7c5f8648
16 changed files with 61 additions and 17 deletions

View File

@@ -217,7 +217,7 @@ class APIView(views.APIView):
context['deprecated'] = True
description = render_to_string(template_list, context)
if context.get('deprecated'):
if context.get('deprecated') and context.get('swagger_method') is None:
# render deprecation messages at the very top
description = '\n'.join([render_to_string('api/_deprecated.md', context), description])
return description