From d7a79ac29fac08f4a05bd1982d519648ededc9f8 Mon Sep 17 00:00:00 2001
From: Trishna Saeharaseelan <trishna.saeharaseelan@noc.ac.uk>
Date: Thu, 16 Feb 2023 20:45:04 +0000
Subject: [PATCH] fix: string format for water_current_velocity

---
 examples/autonomy_engine_adapter/platform_status.json        | 2 +-
 examples/ecosub_adapter/platform_status.json                 | 2 +-
 project/soar/swagger.json                                    | 5 ++---
 tests/fixtures/schemas.py                                    | 5 ++---
 tests/fixtures/swagger.json                                  | 5 ++---
 tests/mock_data/autonomy_engine_adapter/platform_status.json | 2 +-
 tests/mock_data/ecosub_adapter/platform_status.json          | 2 +-
 7 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/examples/autonomy_engine_adapter/platform_status.json b/examples/autonomy_engine_adapter/platform_status.json
index 6fb29e0..59a24f1 100644
--- a/examples/autonomy_engine_adapter/platform_status.json
+++ b/examples/autonomy_engine_adapter/platform_status.json
@@ -39,6 +39,6 @@
         },
         "speed_over_ground": 4.3,
         "thrust_applied": 124.3,
-        "water_current_velocity": 124.3
+        "water_current_velocity": "124.3NE"
     }
 }
diff --git a/examples/ecosub_adapter/platform_status.json b/examples/ecosub_adapter/platform_status.json
index 6fb29e0..59a24f1 100644
--- a/examples/ecosub_adapter/platform_status.json
+++ b/examples/ecosub_adapter/platform_status.json
@@ -39,6 +39,6 @@
         },
         "speed_over_ground": 4.3,
         "thrust_applied": 124.3,
-        "water_current_velocity": 124.3
+        "water_current_velocity": "124.3NE"
     }
 }
diff --git a/project/soar/swagger.json b/project/soar/swagger.json
index 46c8777..515470d 100644
--- a/project/soar/swagger.json
+++ b/project/soar/swagger.json
@@ -666,9 +666,8 @@
           },
           "water_current_velocity": {
             "description": "Water current magnitude and direction",
-            "example": 124.3,
-            "format": "float",
-            "type": "number"
+            "example": "124.3NE",
+            "format": "string"
           }
         },
         "required": [
diff --git a/tests/fixtures/schemas.py b/tests/fixtures/schemas.py
index 9dc8dd2..85ec4da 100644
--- a/tests/fixtures/schemas.py
+++ b/tests/fixtures/schemas.py
@@ -541,10 +541,9 @@ platform_status_schema = {
             "example": 124.3,
         },
         "water_current_velocity": {
-            "type": "number",
-            "format": "float",
+            "format": "string",
             "description": "Water current magnitude and direction",
-            "example": 124.3,
+            "example": "124.3NE",
         },
         "thrust_applied": {
             "type": "number",
diff --git a/tests/fixtures/swagger.json b/tests/fixtures/swagger.json
index fb2150b..44b74e5 100644
--- a/tests/fixtures/swagger.json
+++ b/tests/fixtures/swagger.json
@@ -647,9 +647,8 @@
           },
           "water_current_velocity": {
             "description": "Water current magnitude and direction",
-            "example": 124.3,
-            "format": "float",
-            "type": "number"
+            "example": "124.3NE",
+            "format": "string"
           }
         },
         "required": [
diff --git a/tests/mock_data/autonomy_engine_adapter/platform_status.json b/tests/mock_data/autonomy_engine_adapter/platform_status.json
index 306c0ed..fa2ecad 100644
--- a/tests/mock_data/autonomy_engine_adapter/platform_status.json
+++ b/tests/mock_data/autonomy_engine_adapter/platform_status.json
@@ -39,6 +39,6 @@
         },
         "speed_over_ground": 4.3,
         "thrust_applied": 124.3,
-        "water_current_velocity": 124.3
+        "water_current_velocity": "124.3NE"
     }
 }
diff --git a/tests/mock_data/ecosub_adapter/platform_status.json b/tests/mock_data/ecosub_adapter/platform_status.json
index 6fb29e0..59a24f1 100644
--- a/tests/mock_data/ecosub_adapter/platform_status.json
+++ b/tests/mock_data/ecosub_adapter/platform_status.json
@@ -39,6 +39,6 @@
         },
         "speed_over_ground": 4.3,
         "thrust_applied": 124.3,
-        "water_current_velocity": 124.3
+        "water_current_velocity": "124.3NE"
     }
 }
-- 
GitLab