merged Makefiles

Change-Id: Icee6ba1414dda81a69a89aa9a3f937d4dfe6c685
diff --git a/docs/Makefile b/docs/Makefile
index 7468139..83fb922 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -44,8 +44,34 @@
 xos-tosca:
 	ln -s ../../xos-tosca/docs xos-tosca
 
+# HOW TO
+# - load the virtual env (https://guide.opencord.org/xos/dev/local_env.html)
+# - run `make`
+# - open the browser at `http://127.0.0.1:8080/ui`
+# - you'll see the 'core' apis
+# - you can see a list of available apis at `http://127.0.0.1:8080/specs/`
+# - just replace the swagger file (top bar) with another one to see different APIs (to be improved)
 
-clean:
+DOCSDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
+
+swagger: swagger_clean swagger_docs swagger_serve_spec
+
+venv-xosdocs:
+	./venv-xosdocs.sh
+
+swagger_docs: venv-xosdocs
+	bash -c 'source $(DOCSDIR)venv-xosdocs/bin/activate && python $(DOCSDIR)scripts/swagger_docs.py'
+
+swagger_clean:
+	rm -rf swagger/specs/*
+
+venv_clean:
+	rm -rf $(DOCSDIR)venv-xosdocs
+
+swagger_serve_spec:
+	http-server --cors ./swagger
+
+clean: swagger_clean venv_clean
 	rm -rf $(GENERATED_DOCS)
 	rm -rf _book
 	rm -rf node_modules