Add drf_yasg app for creating automated documentation

Further cleanup code to match the expectations of the linters and
add tox commands for building the documentation.

Issue: HIC-167
Change-Id: I816a578bc7995f4560c19003d0cc907a22e740b6
diff --git a/tox.ini b/tox.ini
index c0f3881..1441f97 100644
--- a/tox.ini
+++ b/tox.ini
@@ -41,3 +41,39 @@
 [flake8]
 format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
 max-complexity = 10
+
+# Documentation
+# Shared commands for both docs options
+[docs]
+swagger_version = 1.3.3
+commands =
+    python manage.py generate_swagger --overwrite documentation/hiccup-api.json
+    wget -nc https://jcenter.bintray.com/io/github/swagger2markup/swagger2markup-cli/{[docs]swagger_version}/swagger2markup-cli-{[docs]swagger_version}.jar
+whitelist_externals=
+    java
+    wget
+
+# Create markdown docs
+[testenv:docs]
+deps = {[testenv]deps}
+commands =
+    {[docs]commands}
+    java -jar swagger2markup-cli-{[docs]swagger_version}.jar convert \
+        -f documentation/api-endpoints \
+        -i documentation/hiccup-api.json \
+        -c documentation/swagger.properties
+whitelist_externals = {[docs]whitelist_externals}
+
+# Create HTML docs
+[testenv:docs-html]
+deps = {[testenv]deps}
+commands =
+    {[docs]commands}
+    java -jar swagger2markup-cli-{[docs]swagger_version}.jar convert \
+        -f documentation/api-endpoints \
+        -i documentation/hiccup-api.json \
+        -c documentation/swagger-asciidoc.properties
+    asciidoctor documentation/api-endpoints.adoc
+whitelist_externals =
+    {[docs]whitelist_externals}
+    asciidoctor
\ No newline at end of file