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
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md
index 590be00..30f0576 100644
--- a/docs/SUMMARY.md
+++ b/docs/SUMMARY.md
@@ -4,12 +4,12 @@
* [Overview](overview.md)
* [Installing XOS](install.md)
* [Using XOS](use.md)
- * [XOS Modeling Framework](xos/dev/xproto.md)
- * [XOS Tool Chain (Internals)](xos/dev/xosgenx.md)
- * [XOS Synchronizer Framework](xos/dev/synchronizers.md)
- * [Synchronizer Design](xos/dev/sync_arch.md)
- * [Synchronizer Implementation](xos/dev/sync_impl.md)
- * [Synchronizer Reference](xos/dev/sync_reference.md)
- * [Core Models](xos/core_models.md)
- * [Security Policies](xos/security_policies.md)
+ * [XOS Modeling Framework](dev/xproto.md)
+ * [XOS Tool Chain (Internals)](dev/xosgenx.md)
+ * [XOS Synchronizer Framework](dev/synchronizers.md)
+ * [Synchronizer Design](dev/sync_arch.md)
+ * [Synchronizer Implementation](dev/sync_impl.md)
+ * [Synchronizer Reference](dev/sync_reference.md)
+ * [Core Models](core_models.md)
+ * [Security Policies](security_policies.md)