Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Communications Backbone System
backbone-message-format
Commits
651454ce
Commit
651454ce
authored
2 years ago
by
Trishna Saeharaseelan
Browse files
Options
Download
Email Patches
Plain Diff
refactor: add nested schema for standard vehicle data
parent
7b0f6f5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
16 deletions
+2
-16
vehicle_status.py
vehicle_status.py
+2
-16
No files found.
vehicle_status.py
View file @
651454ce
"""
schema: vehicle-specific decoded status message (DRAFT)
"""
from
.
import
message_header_schema
,
api
from
.
import
message_header_schema
,
vehicle_schema
,
api
from
flask_restx
import
fields
...
...
@@ -13,11 +13,7 @@ vehicle_status_message_schema = api.model(
required
=
True
,
description
=
"Message header"
,
),
"serial_number"
:
fields
.
String
(
required
=
True
,
description
=
"vehicle serial number"
,
example
=
"ah-1"
,
),
"platform"
:
fields
.
Nested
(
vehicle_schema
)
"time"
:
fields
.
String
(
required
=
True
,
description
=
"Timestamp of message"
,
...
...
@@ -28,16 +24,6 @@ vehicle_status_message_schema = api.model(
description
=
""
,
# we can track the version of the AE plan?
example
=
""
,
),
"platform_ID"
:
fields
.
Integer
(
required
=
True
,
description
=
"Platform ID"
,
example
=
2
,
),
"platform_type"
:
fields
.
String
(
required
=
True
,
description
=
"The high level type of this vehicle"
,
example
=
"alr"
,
),
"platform_state"
:
fields
.
String
(
required
=
True
,
description
=
""
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment