api_docs: Detect missing arguments in curl examples.

This commit adds automated tests that make sure that every curl
example command in our API docs has the '-X (POST|GET)' argument.

Fixes: #11927
This commit is contained in:
Eeshan Garg
2019-05-16 18:08:53 -02:30
committed by Tim Abbott
parent 8339c21637
commit cecea75457
38 changed files with 175 additions and 63 deletions

View File

@@ -124,6 +124,7 @@ class MarkdownDirectoryView(ApiURLView):
# An "article" might require the api_uri_context to be rendered
api_uri_context = {} # type: Dict[str, Any]
add_api_uri_context(api_uri_context, self.request)
api_uri_context["run_content_validators"] = True
context["api_uri_context"] = api_uri_context
return context