From 567966b5e2ec21243495973cce44b93fda89e687 Mon Sep 17 00:00:00 2001 From: Minos Hemrich Date: Thu, 25 Apr 2024 15:25:07 +0200 Subject: [PATCH] set fields as optional and publish --- docs/schema/caga/input_schema.html | 12 ++--- docs/schema/caga/output_schema.html | 70 ++++++++++++++--------------- schema/caga/input_schema.json | 4 +- schema/caga/output_schema.json | 64 +++++++++++++------------- src/maritime_schema/types/caga.py | 16 +++---- 5 files changed, 83 insertions(+), 83 deletions(-) diff --git a/docs/schema/caga/input_schema.html b/docs/schema/caga/input_schema.html index de84dc7..0c6708e 100644 --- a/docs/schema/caga/input_schema.html +++ b/docs/schema/caga/input_schema.html @@ -1,6 +1,6 @@ Test Input Schema

Test Input Schema

Type: object

Title

Type: string Default: null

The title of the traffic situation


Example:

"overtaking_18"
 

Description

Default: null

A description of the traffic situation

Type: string
Type: null

Example:

"Crossing situation with 3 target vessels in the Oslofjord"
-

Starttime

Default: null

Starting time of the situation in ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: null

Example:

"2024-04-17T13:18:32.068170"
+

Starttime

Default: null

Starting time of the situation in ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: null

Example:

"2024-04-25T15:24:53.443647"
 

Own Ship data


Own Ship data

Type: object

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
     "height": 15.0,
     "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
@@ -12,7 +12,7 @@
     "speedMax": 20.0,
     "width": 30.0
 }
-

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"15c7d43b-8e43-4468-a870-6b8f492b942a"
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
 

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
 

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
 

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
@@ -78,7 +78,7 @@
     "speedMax": 20.0,
     "width": 30.0
 }
-

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"15c7d43b-8e43-4468-a870-6b8f492b942a"
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
 

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
 

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
 

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
@@ -190,7 +190,7 @@
     "speedMax": 20.0,
     "width": 30.0
 }
-

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"15c7d43b-8e43-4468-a870-6b8f492b942a"
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
 

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
 

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
 

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
@@ -256,7 +256,7 @@
     "speedMax": 20.0,
     "width": 30.0
 }
-

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"15c7d43b-8e43-4468-a870-6b8f492b942a"
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
 

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
 

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
 

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
@@ -387,4 +387,4 @@
     "windDirection": 180.0,
     "windSpeed": 10.0
 }
-

Additional Properties of any type are allowed.

Type: object
\ No newline at end of file +

Additional Properties of any type are allowed.

Type: object
\ No newline at end of file diff --git a/docs/schema/caga/output_schema.html b/docs/schema/caga/output_schema.html index 3a0b129..01a4a42 100644 --- a/docs/schema/caga/output_schema.html +++ b/docs/schema/caga/output_schema.html @@ -1,7 +1,7 @@ - Test Output Schema

Test Output Schema

Type: object

This is a JSON schema for result data originating from Collision and Grounding Avoidance systems

Creationtime

Type: stringFormat: date-time

Date and Time that this file was created, in ISO 8601 format YYYY-MM-DDThh:mm:ssZ. This should be the simulation end time.


Example:

"2024-04-17T13:18:32.084290"
+ Test Output Schema 

Test Output Schema

Type: object

This is a JSON schema for result data originating from Collision and Grounding Avoidance systems

Creationtime

Type: stringFormat: date-time

Date and Time that this file was created, in ISO 8601 format YYYY-MM-DDThh:mm:ssZ. This should be the simulation end time.


Example:

"2024-04-25T15:24:53.458501"
 

Default: null

The traffic situation that was simulated (input file). This should remain unmofidied.

Type: object

Title

Type: string Default: null

The title of the traffic situation


Example:

"overtaking_18"
 

Description

Default: null

A description of the traffic situation

Type: string
Type: null

Example:

"Crossing situation with 3 target vessels in the Oslofjord"
-

Starttime

Default: null

Starting time of the situation in ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: null

Example:

"2024-04-17T13:18:32.068170"
+

Starttime

Default: null

Starting time of the situation in ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: null

Example:

"2024-04-25T15:24:53.443647"
 

Own Ship data


Own Ship data

Type: object

Type: object Default: null

Static ship information which does not change during a scenario.


Example:

{
     "height": 15.0,
     "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
@@ -13,7 +13,7 @@
     "speedMax": 20.0,
     "width": 30.0
 }
-

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"15c7d43b-8e43-4468-a870-6b8f492b942a"
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
 

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
 

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
 

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
@@ -79,7 +79,7 @@
     "speedMax": 20.0,
     "width": 30.0
 }
-

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"15c7d43b-8e43-4468-a870-6b8f492b942a"
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
 

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
 

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
 

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
@@ -191,7 +191,7 @@
     "speedMax": 20.0,
     "width": 30.0
 }
-

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"15c7d43b-8e43-4468-a870-6b8f492b942a"
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
 

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
 

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
 

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
@@ -257,7 +257,7 @@
     "speedMax": 20.0,
     "width": 30.0
 }
-

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"15c7d43b-8e43-4468-a870-6b8f492b942a"
+

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3455074c-ddcf-4a1e-aef0-03001b2331e3"
 

Length

Type: number Default: null

Length of the ship in meters

Value must be strictly greater than 0.0


Example:

230.0
 

Width

Type: number Default: null

Width of the ship in meters

Value must be strictly greater than 0.0


Example:

30.0
 

Height

Default: null

Height of the ship in meters

Type: number

Value must be strictly greater than 0.0

Type: null

Example:

15.0
@@ -398,8 +398,8 @@
 

Type: number

Time given in seconds to the navigator / system, before the proposed manoeuver is no longer able to be excecuted


Example:

20
 

Type: number

Minimum safety depth


Example:

30
 

Type: number

If automatic maneuver acceptance is enabled, the new route will be activated after a specified number of seconds


Example:

20
-

Additional Properties of any type are allowed.

Type: object

Timeseriesdata


Time series data from the system

Type: array
No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the predicted value ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-17T13:18:32.077385"
-

Targetships

Type: array

list of target ships detected by the CAGA system

No Additional Items

Each item of this array must be:

Type: object

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"be9b7802-e6e9-46c0-a130-e2bfa567f85f"
+

Additional Properties of any type are allowed.

Type: object

Timeseriesdata

Default: null

Time series data from the system

Type: array
No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the predicted value ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-25T15:24:53.452102"
+

Targetships

Type: array

list of target ships detected by the CAGA system

No Additional Items

Each item of this array must be:

Type: object

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"4b97a108-d1eb-4ae7-b37a-88e2c5183f61"
 

Type: object

A geographical coordinate


Example:

{
     "latitude": 51.2123,
     "longitude": 11.2313
@@ -417,7 +417,7 @@
 

Distancetotarget

Default: null

Calculated distance from the own ship to the target vessel

Type: number
Type: null

Example:

1900.2
 

Dcpa

Default: null

Calculated closest point of approach

Type: number
Type: null

Example:

100.3
 

Tcpa

Default: null

calculated time to closest point of approach in seconds

Type: number
Type: null

Example:

2131
-

Predictions

Default: null

List of predicted future values. This can be used to store data like a predicted path for each target vessel. The value field supports both numbers and objects

Type: object

Each additional property must conform to the following schema

Type: array
No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the predicted value ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-17T13:18:32.071961"
+

Predictions

Default: null

List of predicted future values. This can be used to store data like a predicted path for each target vessel. The value field supports both numbers and objects

Type: object

Each additional property must conform to the following schema

Type: array
No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the predicted value ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-25T15:24:53.447183"
 

Value


Value of the prediction

Type: number
Type: object

Examples:

{
     "latitude": 57.2343,
     "longitude": 10.3432
@@ -425,21 +425,21 @@
 
100
 
Type: null

Example:

[
     {
-        "time": "2024-04-17T13:18:32.072891",
+        "time": "2024-04-25T15:24:53.448050",
         "value": {
             "latitude": 57.2343,
             "longitude": 10.3432
         }
     },
     {
-        "time": "2024-04-17T13:18:32.072906",
+        "time": "2024-04-25T15:24:53.448064",
         "value": {
             "latitude": 57.2343,
             "longitude": 10.3432
         }
     },
     {
-        "time": "2024-04-17T13:18:32.072911",
+        "time": "2024-04-25T15:24:53.448069",
         "value": {
             "latitude": 57.2343,
             "longitude": 10.3432
@@ -465,21 +465,21 @@
         "predictions": {
             "position": [
                 {
-                    "time": "2024-04-17T13:18:32.077422",
+                    "time": "2024-04-25T15:24:53.452140",
                     "value": {
                         "latitude": 57.2343,
                         "longitude": 10.3432
                     }
                 },
                 {
-                    "time": "2024-04-17T13:18:32.077430",
+                    "time": "2024-04-25T15:24:53.452147",
                     "value": {
                         "latitude": 57.2343,
                         "longitude": 10.3432
                     }
                 },
                 {
-                    "time": "2024-04-17T13:18:32.077435",
+                    "time": "2024-04-25T15:24:53.452152",
                     "value": {
                         "latitude": 57.2343,
                         "longitude": 10.3432
@@ -513,21 +513,21 @@
                 "predictions": {
                     "position": [
                         {
-                            "time": "2024-04-17T13:18:32.080533",
+                            "time": "2024-04-25T15:24:53.454897",
                             "value": {
                                 "latitude": 57.2343,
                                 "longitude": 10.3432
                             }
                         },
                         {
-                            "time": "2024-04-17T13:18:32.080540",
+                            "time": "2024-04-25T15:24:53.454903",
                             "value": {
                                 "latitude": 57.2343,
                                 "longitude": 10.3432
                             }
                         },
                         {
-                            "time": "2024-04-17T13:18:32.080545",
+                            "time": "2024-04-25T15:24:53.454907",
                             "value": {
                                 "latitude": 57.2343,
                                 "longitude": 10.3432
@@ -539,10 +539,10 @@
                 "tcpa": 1200.0
             }
         ],
-        "time": "2024-04-17T13:18:32.080518"
+        "time": "2024-04-25T15:24:53.454884"
     }
 ]
-

Eventdata

Type: array Default: null

Event data from the system

No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the event

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-17T13:18:32.078746"
+

Eventdata

Type: array Default: null

Event data from the system

No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the event

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-25T15:24:53.453323"
 

Route

Type: array Default: null

Planned CAGA Route

No Additional Items

Each item of this array must be:

Type: object

Type: object

A geographical coordinate


Example:

{
     "latitude": 51.2123,
     "longitude": 11.2313
@@ -683,7 +683,7 @@
                 "turnRadius": 500.0
             }
         ],
-        "time": "2024-04-17T13:18:32.080611"
+        "time": "2024-04-25T15:24:53.454964"
     }
 ]
 
Type: null

Example:

{
@@ -760,7 +760,7 @@
                     "turnRadius": 500.0
                 }
             ],
-            "time": "2024-04-17T13:18:32.084392"
+            "time": "2024-04-25T15:24:53.458602"
         }
     ],
     "timeSeriesData": [
@@ -785,21 +785,21 @@
                     "predictions": {
                         "position": [
                             {
-                                "time": "2024-04-17T13:18:32.084367",
+                                "time": "2024-04-25T15:24:53.458576",
                                 "value": {
                                     "latitude": 57.2343,
                                     "longitude": 10.3432
                                 }
                             },
                             {
-                                "time": "2024-04-17T13:18:32.084373",
+                                "time": "2024-04-25T15:24:53.458583",
                                 "value": {
                                     "latitude": 57.2343,
                                     "longitude": 10.3432
                                 }
                             },
                             {
-                                "time": "2024-04-17T13:18:32.084378",
+                                "time": "2024-04-25T15:24:53.458587",
                                 "value": {
                                     "latitude": 57.2343,
                                     "longitude": 10.3432
@@ -811,7 +811,7 @@
                     "tcpa": 1200.0
                 }
             ],
-            "time": "2024-04-17T13:18:32.084356"
+            "time": "2024-04-25T15:24:53.458565"
         }
     ]
 }
@@ -823,8 +823,8 @@
 

Name

Type: string

The name of the system


Example:

"AutoNavigation-System 1"
 

Vendor

Type: string

The name of the system vendor


Example:

"CompanyABC"
 

Version

Type: string

The software version


Example:

"1.2.3"
-

Additional Properties of any type are allowed.

Type: object

Timeseriesdata

Type: array

TimeSeries data originating from the Simulator

No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the predicted value ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-17T13:18:32.082156"
-

Type: object

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"80d3baa0-dd16-4ccc-b8a3-76dd5ae74af0"
+

Additional Properties of any type are allowed.

Type: object

Timeseriesdata

Type: array

TimeSeries data originating from the Simulator

No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the predicted value ISO 8601 format YYYY-MM-DDThh:mm:ssZ

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-25T15:24:53.456463"
+

Type: object

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3dc93d22-f9b5-4efb-8c8f-b7512cfbdc0b"
 

Type: object

A geographical coordinate


Example:

{
     "latitude": 51.2123,
     "longitude": 11.2313
@@ -836,7 +836,7 @@
 

ship heading

Default: null

Initial ship heading in degrees

Type: number

Value must be greater or equal to 0.0 and lesser or equal to 360.0

Type: null

Example:

45.2
 

Type: enum (of string)

AIS Navigational Status

Must be one of:

  • "Under way using engine"
  • "At anchor"
  • "Not under command"
  • "Restricted manoeuverability"
  • "Constrained by her draught"
  • "Moored"
  • "Aground"
  • "Engaged in fishing"
  • "Under way sailing"
  • "Reserved for future amendment of navigational status for HSC"
  • "Reserved for future amendment of navigational status for WIG"
  • "Reserved for future use 1"
  • "Reserved for future use 2"
  • "Reserved for future use 3"
  • "AIS SART is active"
  • "Not defined (default)"

Acceleration

Type: number Default: null

Ship acceleration in ms^-2


Example:

0.01
 

Rateofturn

Type: number Default: null

Ship rate of turn in deg/s


Example:

1.8
-

Additional Properties of any type are allowed.

Type: object

Targetships

Type: array
No Additional Items

Each item of this array must be:

Type: object

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"80d3baa0-dd16-4ccc-b8a3-76dd5ae74af0"
+

Additional Properties of any type are allowed.

Type: object

Targetships

Type: array
No Additional Items

Each item of this array must be:

Type: object

Id

Type: stringFormat: uuid

Unique Identifier


Example:

"3dc93d22-f9b5-4efb-8c8f-b7512cfbdc0b"
 

Type: object

A geographical coordinate


Example:

{
     "latitude": 51.2123,
     "longitude": 11.2313
@@ -891,7 +891,7 @@
                 "sog": 10.0
             }
         ],
-        "time": "2024-04-17T13:18:32.083129"
+        "time": "2024-04-25T15:24:53.457395"
     },
     {
         "ownShip": {
@@ -935,10 +935,10 @@
                 "sog": 10.0
             }
         ],
-        "time": "2024-04-17T13:18:32.083168"
+        "time": "2024-04-25T15:24:53.457433"
     }
 ]
-

Eventdata

Type: array Default: null

Event data from the simulator

No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the event

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-17T13:18:32.079967"
+

Eventdata

Type: array Default: null

Event data from the simulator

No Additional Items

Each item of this array must be:

Type: object

Time


Date and Time of the event

Type: stringFormat: date-time
Type: integer

Example:

"2024-04-25T15:24:53.454371"
 

Additional Properties of any type are allowed.

Type: object
Type: null

Example:

{
     "configuration": {
         "name": "AutoNavigation-System 1",
@@ -989,7 +989,7 @@
                     "sog": 10.0
                 }
             ],
-            "time": "2024-04-17T13:18:32.084465"
+            "time": "2024-04-25T15:24:53.458674"
         },
         {
             "ownShip": {
@@ -1033,8 +1033,8 @@
                     "sog": 10.0
                 }
             ],
-            "time": "2024-04-17T13:18:32.084509"
+            "time": "2024-04-25T15:24:53.458701"
         }
     ]
 }
-

Additional Properties of any type are allowed.

Type: object
\ No newline at end of file +

Additional Properties of any type are allowed.

Type: object
\ No newline at end of file diff --git a/schema/caga/input_schema.json b/schema/caga/input_schema.json index 5793f26..f25ed99 100644 --- a/schema/caga/input_schema.json +++ b/schema/caga/input_schema.json @@ -551,7 +551,7 @@ "id": { "description": "Unique Identifier", "examples": [ - "15c7d43b-8e43-4468-a870-6b8f492b942a" + "3455074c-ddcf-4a1e-aef0-03001b2331e3" ], "format": "uuid", "title": "Id", @@ -885,7 +885,7 @@ "default": null, "description": "Starting time of the situation in `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`", "examples": [ - "2024-04-17T13:18:32.068170" + "2024-04-25T15:24:53.443647" ], "title": "Starttime" }, diff --git a/schema/caga/output_schema.json b/schema/caga/output_schema.json index 3b1af08..9aeb05d 100644 --- a/schema/caga/output_schema.json +++ b/schema/caga/output_schema.json @@ -98,6 +98,7 @@ "type": "null" } ], + "default": null, "description": "Time series data from the system", "examples": [ [ @@ -122,21 +123,21 @@ "predictions": { "position": [ { - "time": "2024-04-17T13:18:32.080533", + "time": "2024-04-25T15:24:53.454897", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-17T13:18:32.080540", + "time": "2024-04-25T15:24:53.454903", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-17T13:18:32.080545", + "time": "2024-04-25T15:24:53.454907", "value": { "latitude": 57.2343, "longitude": 10.3432 @@ -148,7 +149,7 @@ "tcpa": 1200.0 } ], - "time": "2024-04-17T13:18:32.080518" + "time": "2024-04-25T15:24:53.454884" } ] ], @@ -226,7 +227,7 @@ "turnRadius": 500.0 } ], - "time": "2024-04-17T13:18:32.080611" + "time": "2024-04-25T15:24:53.454964" } ] ], @@ -238,8 +239,7 @@ } }, "required": [ - "configuration", - "timeSeriesData" + "configuration" ], "title": "CagaData", "type": "object" @@ -259,7 +259,7 @@ ], "description": "Date and Time of the event", "examples": [ - "2024-04-17T13:18:32.078746" + "2024-04-25T15:24:53.453323" ], "title": "Time" }, @@ -373,7 +373,7 @@ ], "description": "Date and Time of the predicted value `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`", "examples": [ - "2024-04-17T13:18:32.077385" + "2024-04-25T15:24:53.452102" ], "title": "Time" }, @@ -399,21 +399,21 @@ "predictions": { "position": [ { - "time": "2024-04-17T13:18:32.077422", + "time": "2024-04-25T15:24:53.452140", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-17T13:18:32.077430", + "time": "2024-04-25T15:24:53.452147", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-17T13:18:32.077435", + "time": "2024-04-25T15:24:53.452152", "value": { "latitude": 57.2343, "longitude": 10.3432 @@ -529,7 +529,7 @@ "id": { "description": "Unique Identifier", "examples": [ - "be9b7802-e6e9-46c0-a130-e2bfa567f85f" + "4b97a108-d1eb-4ae7-b37a-88e2c5183f61" ], "format": "uuid", "title": "Id", @@ -703,21 +703,21 @@ "examples": [ [ { - "time": "2024-04-17T13:18:32.072891", + "time": "2024-04-25T15:24:53.448050", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-17T13:18:32.072906", + "time": "2024-04-25T15:24:53.448064", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-17T13:18:32.072911", + "time": "2024-04-25T15:24:53.448069", "value": { "latitude": 57.2343, "longitude": 10.3432 @@ -1117,7 +1117,7 @@ ], "description": "Date and Time of the predicted value `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`", "examples": [ - "2024-04-17T13:18:32.071961" + "2024-04-25T15:24:53.447183" ], "title": "Time" }, @@ -1243,7 +1243,7 @@ "id": { "description": "Unique Identifier", "examples": [ - "15c7d43b-8e43-4468-a870-6b8f492b942a" + "3455074c-ddcf-4a1e-aef0-03001b2331e3" ], "format": "uuid", "title": "Id", @@ -1380,7 +1380,7 @@ "id": { "description": "Unique Identifier", "examples": [ - "80d3baa0-dd16-4ccc-b8a3-76dd5ae74af0" + "3dc93d22-f9b5-4efb-8c8f-b7512cfbdc0b" ], "format": "uuid", "title": "Id", @@ -1537,7 +1537,7 @@ "sog": 10.0 } ], - "time": "2024-04-17T13:18:32.083129" + "time": "2024-04-25T15:24:53.457395" }, { "ownShip": { @@ -1581,7 +1581,7 @@ "sog": 10.0 } ], - "time": "2024-04-17T13:18:32.083168" + "time": "2024-04-25T15:24:53.457433" } ] ], @@ -1622,7 +1622,7 @@ ], "description": "Date and Time of the predicted value `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`", "examples": [ - "2024-04-17T13:18:32.082156" + "2024-04-25T15:24:53.456463" ], "title": "Time" }, @@ -1660,7 +1660,7 @@ ], "description": "Date and Time of the event", "examples": [ - "2024-04-17T13:18:32.079967" + "2024-04-25T15:24:53.454371" ], "title": "Time" } @@ -1839,7 +1839,7 @@ "default": null, "description": "Starting time of the situation in `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`", "examples": [ - "2024-04-17T13:18:32.068170" + "2024-04-25T15:24:53.443647" ], "title": "Starttime" }, @@ -2083,7 +2083,7 @@ "creationTime": { "description": "Date and Time that this file was created, in `ISO 8601` format `YYYY-MM-DDThh:mm:ssZ`. This should be the simulation end time.", "examples": [ - "2024-04-17T13:18:32.084290" + "2024-04-25T15:24:53.458501" ], "format": "date-time", "title": "Creationtime", @@ -2187,7 +2187,7 @@ "turnRadius": 500.0 } ], - "time": "2024-04-17T13:18:32.084392" + "time": "2024-04-25T15:24:53.458602" } ], "timeSeriesData": [ @@ -2212,21 +2212,21 @@ "predictions": { "position": [ { - "time": "2024-04-17T13:18:32.084367", + "time": "2024-04-25T15:24:53.458576", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-17T13:18:32.084373", + "time": "2024-04-25T15:24:53.458583", "value": { "latitude": 57.2343, "longitude": 10.3432 } }, { - "time": "2024-04-17T13:18:32.084378", + "time": "2024-04-25T15:24:53.458587", "value": { "latitude": 57.2343, "longitude": 10.3432 @@ -2238,7 +2238,7 @@ "tcpa": 1200.0 } ], - "time": "2024-04-17T13:18:32.084356" + "time": "2024-04-25T15:24:53.458565" } ] } @@ -2306,7 +2306,7 @@ "sog": 10.0 } ], - "time": "2024-04-17T13:18:32.084465" + "time": "2024-04-25T15:24:53.458674" }, { "ownShip": { @@ -2350,7 +2350,7 @@ "sog": 10.0 } ], - "time": "2024-04-17T13:18:32.084509" + "time": "2024-04-25T15:24:53.458701" } ] } diff --git a/src/maritime_schema/types/caga.py b/src/maritime_schema/types/caga.py index f4a0ef5..0de61db 100644 --- a/src/maritime_schema/types/caga.py +++ b/src/maritime_schema/types/caga.py @@ -589,15 +589,15 @@ class SimulatorEvent(BaseModelConfig): class CagaData(BaseModelConfig): - configuration: CagaConfiguration = Field( - ..., description="System Configuration", examples=[create_caga_config_example()] + configuration: Optional[CagaConfiguration] = Field( + None, description="System Configuration", examples=[create_caga_config_example()] ) time_series_data: Optional[List[CagaTimeStep]] = Field( None, description="Time series data from the system", examples=[[create_caga_time_frame_example()]], ) - event_data: List[CagaEvent] = Field( + event_data: Optional[List[CagaEvent]] = Field( None, description="Event data from the system", examples=[[create_caga_event_example()]], @@ -615,13 +615,13 @@ class SimulationTimeFrame(BaseModelConfig): class SimulationData(BaseModelConfig): - configuration: SoftwareConfig = Field( - ..., + configuration: Optional[SoftwareConfig] = Field( + None, description="Simulator software configuration", examples=[create_software_config_example()], ) - time_series_data: List[SimulationTimeFrame] = Field( - ..., + time_series_data: Optional[List[SimulationTimeFrame]] = Field( + None, description="TimeSeries data originating from the Simulator", examples=[ [ @@ -630,7 +630,7 @@ class SimulationData(BaseModelConfig): ] ], ) - event_data: List[SimulatorEvent] = Field(None, description="Event data from the simulator") + event_data: Optional[List[SimulatorEvent]] = Field(None, description="Event data from the simulator") class OutputSchema(BaseModelConfig):