Skip to content

Commit f288ffd

Browse files
Merge pull request #6 from finos/scottlogic-examples-patch-1
Adding common schema definitions
2 parents 5a4514d + 2a540bd commit f288ffd

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://finos.org/schemas/common/address.schema.json",
4+
"title": "Address",
5+
"description": "Schema for a postal address.",
6+
"type": "object",
7+
"required": ["addressLine1", "city", "postalCode", "country"],
8+
"properties": {
9+
"addressLine1": {
10+
"type": "string",
11+
"minLength": 1,
12+
"maxLength": 100,
13+
"description": "First line of address"
14+
},
15+
"addressLine2": {
16+
"type": "string",
17+
"maxLength": 100,
18+
"description": "Second line of address"
19+
},
20+
"addressLine3": {
21+
"type": "string",
22+
"maxLength": 100,
23+
"description": "Third line of address"
24+
},
25+
"city": {
26+
"type": "string",
27+
"minLength": 1,
28+
"maxLength": 100,
29+
"description": "City or town"
30+
},
31+
"stateProvince": {
32+
"type": "string",
33+
"maxLength": 100,
34+
"description": "State, province, or region"
35+
},
36+
"postalCode": {
37+
"type": "string",
38+
"maxLength": 20,
39+
"description": "Postal or ZIP code"
40+
},
41+
"country": {
42+
"type": "string",
43+
"pattern": "^[A-Z]{3}$",
44+
"description": "Country code (ISO 3166-1 alpha-3)"
45+
}
46+
}
47+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://finos.org/schemas/common/contact-details.schema.json",
4+
"title": "Contact Details",
5+
"description": "Schema for contact details including email and phone numbers.",
6+
"type": "object",
7+
"required": ["emailAddress", "phoneNumber"],
8+
"properties": {
9+
"emailAddress": {
10+
"type": "string",
11+
"format": "email",
12+
"description": "Primary email address"
13+
},
14+
"phoneNumber": {
15+
"type": "string",
16+
"pattern": "^\\+[1-9][0-9]{1,14}$",
17+
"description": "Primary phone number in E.164 format"
18+
},
19+
"mobileNumber": {
20+
"type": "string",
21+
"pattern": "^\\+[1-9][0-9]{1,14}$",
22+
"description": "Mobile phone number in E.164 format"
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)