acknowledgement.py 1.22 KB
Newer Older
1 2 3 4
"""
    schemas: Acknowledgement status sent by the surface platform to report
    receipt of message.
"""
5 6 7 8
# from openapi_schema_validator import validate
# from jsonschema import validate


9
acknowledgement_schema = {
10
    "allOf": [{"$ref": "#/components/schemas/Message"}],
11
    "type": "object",
12
    "properties": {
13
        "acknowledged_message_ID": {
14 15
            "type": "string",
            "description": "Identifier of message received and executed with "
16
            + "success for mission plans sent by the Autonomy Engine.",
17
            "example": "02125022255-7bc8-11ed-a1eb-0242ac999999",
18 19 20
        },
        "status": {
            "type": "string",
21
            "enum": ["c2_received", "operator_approved_and_sent", "executed"],
22
            "description": "Highest level of acknowledgement. I.e."
23 24 25
            + " `c2_received`: Received by C2, `operator_approved_and_sent`"
            + " : Approved by operator and sent from C2->Platform,"
            + " `executed`: Executed by platform",
26 27
            "example": "executed by platform",
        },
28
    },
29
    "required": ["acknowledged_message_ID", "status"],
30
}
31 32 33 34 35

# validate(
#     {"acknowledged_message_ID": "string-type-id", "status": "c2_received"},
#     acknowledgement_schema,
# )