[SEBA-493] Fixing swagger documentation

Change-Id: I71c11b1bf0b03b9663cb09f9d286658d0dfad660
diff --git a/VERSION b/VERSION
index c594452..fa27025 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.1.51
+2.1.52
diff --git a/containers/chameleon/Dockerfile.chameleon b/containers/chameleon/Dockerfile.chameleon
index 1e242a2..3aaa826 100644
--- a/containers/chameleon/Dockerfile.chameleon
+++ b/containers/chameleon/Dockerfile.chameleon
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/chameleon
-FROM xosproject/xos-base:2.1.51
+FROM xosproject/xos-base:2.1.52
 
 # xos-base already has protoc and dependencies installed
 
diff --git a/containers/xos/Dockerfile.client b/containers/xos/Dockerfile.client
index 781b3e8..2ebab67 100644
--- a/containers/xos/Dockerfile.client
+++ b/containers/xos/Dockerfile.client
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-client
-FROM xosproject/xos-libraries:2.1.51
+FROM xosproject/xos-libraries:2.1.52
 
 
 # Install XOS client
diff --git a/containers/xos/Dockerfile.libraries b/containers/xos/Dockerfile.libraries
index 6f2041b..28a1ec8 100644
--- a/containers/xos/Dockerfile.libraries
+++ b/containers/xos/Dockerfile.libraries
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-libraries
-FROM xosproject/xos-base:2.1.51
+FROM xosproject/xos-base:2.1.52
 
 # Add libraries
 COPY lib /opt/xos/lib
diff --git a/containers/xos/Dockerfile.synchronizer-base b/containers/xos/Dockerfile.synchronizer-base
index 4043b9c..ab39a43 100644
--- a/containers/xos/Dockerfile.synchronizer-base
+++ b/containers/xos/Dockerfile.synchronizer-base
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-synchronizer-base
-FROM xosproject/xos-client:2.1.51
+FROM xosproject/xos-client:2.1.52
 
 COPY xos/synchronizers/new_base /opt/xos/synchronizers/new_base
 COPY xos/xos/logger.py /opt/xos/xos/logger.py
diff --git a/containers/xos/Dockerfile.xos-core b/containers/xos/Dockerfile.xos-core
index cc92556..e9bbd14 100644
--- a/containers/xos/Dockerfile.xos-core
+++ b/containers/xos/Dockerfile.xos-core
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-core
-FROM xosproject/xos-libraries:2.1.51
+FROM xosproject/xos-libraries:2.1.52
 
 # Install XOS
 ADD xos /opt/xos
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