diff --git a/json_schema/client_to_server.json b/json_schema/client_to_server.json index f641090..4249160 100644 --- a/json_schema/client_to_server.json +++ b/json_schema/client_to_server.json @@ -141,6 +141,23 @@ }, "required": [ "player_uuid", "message"] } + }, + { + "if": { + "properties": { + "message_type": { "const": "server/terminate" } + } + }, + "then": { + "properties": { + "player_uuid": { + "description": "The uuid of the player who sent the message", + "type": "string", + "format": "uuid" + } + }, + "required": [ "player_uuid" ] + } } ] } \ No newline at end of file diff --git a/json_schema/examples/client_to_server/server_terminate.example.json b/json_schema/examples/client_to_server/server_terminate.example.json new file mode 100644 index 0000000..0c97cf5 --- /dev/null +++ b/json_schema/examples/client_to_server/server_terminate.example.json @@ -0,0 +1,4 @@ +{ + "message_type": "server/terminate", + "player_uuid": "123e4567-e89b-12d3-a456-426614174000" +} \ No newline at end of file