Skip to content

Commit db6d700

Browse files
author
nobody
committed
JSON Schema Update
1 parent 77c67d0 commit db6d700

File tree

7 files changed

+212
-0
lines changed

7 files changed

+212
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"new_account_wallet_check_duplicate_name_and_dob": 1,
3+
"date_of_birth": "1980-01-31",
4+
"first_name": "Peter",
5+
"last_name": "Pan"
6+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Check for duplicate name and date of birth (response)",
4+
"description": "Response for checking if name and date of birth match an existing account.",
5+
"type": "object",
6+
"required": [
7+
"echo_req",
8+
"msg_type"
9+
],
10+
"properties": {
11+
"new_account_wallet_check_duplicate_name_and_dob": {
12+
"title": "new_account_wallet_check_duplicate_name_and_dob",
13+
"description": "The result of checking for duplicate name and date of birth",
14+
"type": "object",
15+
"additionalProperties": false,
16+
"required": [
17+
"has_duplicate"
18+
],
19+
"properties": {
20+
"has_duplicate": {
21+
"description": "1 if a matching account was found, 0 if not",
22+
"type": "integer",
23+
"enum": [
24+
0,
25+
1
26+
]
27+
}
28+
}
29+
},
30+
"echo_req": {
31+
"description": "Echo of the request made.",
32+
"type": "object"
33+
},
34+
"msg_type": {
35+
"description": "Action name of the request made.",
36+
"type": "string",
37+
"enum": [
38+
"new_account_wallet_check_duplicate_name_and_dob"
39+
]
40+
},
41+
"req_id": {
42+
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
43+
"type": "integer"
44+
}
45+
}
46+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Check for duplicate name and date of birth (request)",
4+
"description": "Check if name and date of birth match an existing account.",
5+
"type": "object",
6+
"auth_required": 1,
7+
"auth_scopes": [
8+
"admin"
9+
],
10+
"additionalProperties": false,
11+
"required": [
12+
"new_account_wallet_check_duplicate_name_and_dob",
13+
"date_of_birth",
14+
"first_name",
15+
"last_name"
16+
],
17+
"properties": {
18+
"new_account_wallet_check_duplicate_name_and_dob": {
19+
"description": "Set to 1 to check for duplicate name and date of birth.",
20+
"type": "integer",
21+
"enum": [
22+
1
23+
]
24+
},
25+
"date_of_birth": {
26+
"description": "Date of birth format: yyyy-mm-dd",
27+
"type": "string",
28+
"pattern": "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$"
29+
},
30+
"first_name": {
31+
"description": "Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.",
32+
"type": "string",
33+
"pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{1,50}$",
34+
"sensitive": 1
35+
},
36+
"last_name": {
37+
"description": "Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.",
38+
"type": "string",
39+
"pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{1,50}$",
40+
"sensitive": 1
41+
},
42+
"loginid": {
43+
"description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.",
44+
"type": "string",
45+
"pattern": "^[A-Za-z]+[0-9]+$"
46+
},
47+
"passthrough": {
48+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.",
49+
"type": "object"
50+
},
51+
"req_id": {
52+
"description": "[Optional] Used to map request to response.",
53+
"type": "integer"
54+
}
55+
}
56+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"new_account_wallet_check_duplicate_phone_and_dob": 1,
3+
"date_of_birth": "1980-01-31",
4+
"phone_number": "+67212312312"
5+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Check for duplicate name and date of birth (response)",
4+
"description": "Response for checking if name and date of birth match an existing account.",
5+
"type": "object",
6+
"required": [
7+
"echo_req",
8+
"msg_type"
9+
],
10+
"properties": {
11+
"new_account_wallet_check_duplicate_phone_and_dob": {
12+
"title": "new_account_wallet_check_duplicate_phone_and_dob",
13+
"description": "The result of checking for duplicate name and date of birth",
14+
"type": "object",
15+
"additionalProperties": false,
16+
"required": [
17+
"has_duplicate"
18+
],
19+
"properties": {
20+
"has_duplicate": {
21+
"description": "1 if a matching account was found, 0 if not",
22+
"type": "integer",
23+
"enum": [
24+
0,
25+
1
26+
]
27+
}
28+
}
29+
},
30+
"echo_req": {
31+
"description": "Echo of the request made.",
32+
"type": "object"
33+
},
34+
"msg_type": {
35+
"description": "Action name of the request made.",
36+
"type": "string",
37+
"enum": [
38+
"new_account_wallet_check_duplicate_phone_and_dob"
39+
]
40+
},
41+
"req_id": {
42+
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
43+
"type": "integer"
44+
}
45+
}
46+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Check for duplicate name and date of birth (request)",
4+
"description": "Check if name and date of birth match an existing account.",
5+
"type": "object",
6+
"auth_required": 1,
7+
"auth_scopes": [
8+
"admin"
9+
],
10+
"additionalProperties": false,
11+
"required": [
12+
"new_account_wallet_check_duplicate_phone_and_dob",
13+
"date_of_birth",
14+
"phone_number"
15+
],
16+
"properties": {
17+
"new_account_wallet_check_duplicate_phone_and_dob": {
18+
"description": "Set to 1 to check for duplicate phone number and date of birth.",
19+
"type": "integer",
20+
"enum": [
21+
1
22+
]
23+
},
24+
"date_of_birth": {
25+
"description": "Date of birth format: yyyy-mm-dd",
26+
"type": "string",
27+
"pattern": "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$"
28+
},
29+
"phone_number": {
30+
"description": "Phone number starts with + sign and country code with digits",
31+
"type": "string",
32+
"pattern": "^\\+[\\-\\ 0-9]{8,40}$",
33+
"sensitive": 1
34+
},
35+
"loginid": {
36+
"description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.",
37+
"type": "string",
38+
"pattern": "^[A-Za-z]+[0-9]+$"
39+
},
40+
"passthrough": {
41+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.",
42+
"type": "object"
43+
},
44+
"req_id": {
45+
"description": "[Optional] Used to map request to response.",
46+
"type": "integer"
47+
}
48+
}
49+
}

static/data/v3.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ groups:
117117
title: 'New Real-Money Account: Default Landing Company'
118118
- name: new_account_virtual
119119
title: New Virtual-Money Account
120+
- name: new_account_wallet_check_duplicate_name_and_dob
121+
title: Check for duplicate name and date of birth
122+
- name: new_account_wallet_check_duplicate_phone_and_dob
123+
title: Check for duplicate name and date of birth
120124
- name: new_partner_account
121125
title: 'New Real-Partner Account: Default Landing Company'
122126
- name: oauth_apps

0 commit comments

Comments
 (0)