From 43b5eb01cc05100ad5301e2b3f22005abd0f2929 Mon Sep 17 00:00:00 2001 From: nobody Date: Thu, 6 Jun 2024 16:10:53 +0000 Subject: [PATCH] JSON Schema Update --- _data/v3.yml | 2 + .../v3/trading_platform_status/example.json | 3 ++ .../v3/trading_platform_status/receive.json | 51 +++++++++++++++++++ config/v3/trading_platform_status/send.json | 28 ++++++++++ 4 files changed, 84 insertions(+) create mode 100644 config/v3/trading_platform_status/example.json create mode 100644 config/v3/trading_platform_status/receive.json create mode 100644 config/v3/trading_platform_status/send.json diff --git a/_data/v3.yml b/_data/v3.yml index 240d518de..d9bb35ef8 100644 --- a/_data/v3.yml +++ b/_data/v3.yml @@ -223,6 +223,8 @@ groups: title: 'Trading Platform: Investor Password Reset' - name: trading_platform_password_reset title: 'Trading Platform: Password Reset' + - name: trading_platform_status + title: Trading Platform Status - name: trading_servers title: Server list - name: trading_times diff --git a/config/v3/trading_platform_status/example.json b/config/v3/trading_platform_status/example.json new file mode 100644 index 000000000..a343f0e76 --- /dev/null +++ b/config/v3/trading_platform_status/example.json @@ -0,0 +1,3 @@ +{ + "trading_platform_status": 1 +} diff --git a/config/v3/trading_platform_status/receive.json b/config/v3/trading_platform_status/receive.json new file mode 100644 index 000000000..f26a4d960 --- /dev/null +++ b/config/v3/trading_platform_status/receive.json @@ -0,0 +1,51 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Trading Platform Status (response)", + "description": "Provides current suspension status of trading platforms", + "type": "object", + "additionalProperties": false, + "required": [ + "trading_platform_status", + "echo_req", + "msg_type" + ], + "properties": { + "trading_platform_status": { + "title": "trading_platform_status", + "description": "Availability status of the trading platforms", + "type": "array", + "additionalProperties": false, + "patternProperties": { + ".*": { + "description": "Name of the trading platform", + "type": "string", + "additionalProperties": false + } + }, + "status": { + "description": "Status of the trading platform", + "type": "string", + "enum": [ + "active", + "maintenance" + ], + "additionalProperties": false + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "trading_platform_status" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" + } + } +} diff --git a/config/v3/trading_platform_status/send.json b/config/v3/trading_platform_status/send.json new file mode 100644 index 000000000..a3a05f1b1 --- /dev/null +++ b/config/v3/trading_platform_status/send.json @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Trading Platform Status (request)", + "description": "Request trading platform status", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "trading_platform_status" + ], + "properties": { + "trading_platform_status": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } + } +}