[SEBA-493] Fixing swagger documentation

Change-Id: I71c11b1bf0b03b9663cb09f9d286658d0dfad660
diff --git a/docs/scripts/swagger_docs.py b/docs/scripts/swagger_docs.py
index 77c74bf..ffe36e7 100644
--- a/docs/scripts/swagger_docs.py
+++ b/docs/scripts/swagger_docs.py
@@ -17,11 +17,7 @@
 
 CWD = OUTPUT_DIR = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
 SWAGGER_DOCS_DIR = os.path.abspath(CWD + '/../swagger/specs')
-ORCHESTRATION_DIR = os.path.abspath(CWD + "/../../../")
-SERVICE_DIR = os.path.abspath(ORCHESTRATION_DIR + "/xos_services")
-PROFILE_DIR = os.path.abspath(ORCHESTRATION_DIR + "/profiles")
-
-XOS_XPROTO = os.path.abspath(CWD + "/../../xos/core/models/core.xproto")
+REPO_DIR = os.path.abspath(CWD + "/../../../")
 
 class Args:
     pass
@@ -54,7 +50,7 @@
         item_abs_path = os.path.abspath(root + "/" + item)
         if os.path.isdir(item_abs_path):
             files = files + get_xproto_recursively(item_abs_path)
-        elif os.path.isfile(item_abs_path):
+        elif os.path.isfile(item_abs_path) and ".xproto" in item_abs_path:
             files.append(item_abs_path)
 
     return [f for f in files if "xproto" in f]
@@ -62,13 +58,9 @@
 
 def main():
 
-    protos = [XOS_XPROTO]
+    protos = get_xproto_recursively(REPO_DIR)
 
-    service_protos = get_xproto_recursively(SERVICE_DIR)
-
-    profile_protos = get_xproto_recursively(PROFILE_DIR)
-
-    generate_swagger_docs(protos + service_protos + profile_protos)
+    generate_swagger_docs(protos)
 
 
 if __name__ == '__main__':
diff --git a/docs/venv-xosdocs.sh b/docs/venv-xosdocs.sh
index 74bc278..7f34502 100755
--- a/docs/venv-xosdocs.sh
+++ b/docs/venv-xosdocs.sh
@@ -35,4 +35,4 @@
 
 # install pip packages
 pip install -e $BASEDIR/$VENVDIR/../../lib/xos-genx
-pip install plyxproto jinja2 pattern astunparse pyyaml colorama
+pip install plyxproto jinja2 astunparse pyyaml colorama