-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.schema.json
180 lines (180 loc) · 6.59 KB
/
config.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/luczsoma/lottery-random/blob/main/config.schema.json",
"title": "lottery-random configuration file schema",
"description": "Your supplied config.json file for lottery-random must comply with this schema.",
"type": "object",
"properties": {
"random_org_api_key": {
"title": "random.org API key",
"description": "Your API key for the random.org API. The lottery-random MUST NOT be used with neither the free Developer nor the Non-Profit API key license: visit https://api.random.org/pricing for details.",
"type": "string"
},
"azure_email_endpoint": {
"title": "Azure Communication Services endpoint",
"description": "The API endpoint of your Azure Communication Services instance",
"type": "string"
},
"azure_email_key": {
"title": "Azure Communication Services key",
"description": "The API key of your Azure Communication Services instance",
"type": "string"
},
"sender_email": {
"title": "Sender email",
"description": "The email address that is configured in Azure Communication Services as the sender email",
"type": "string",
"format": "email"
},
"sender_name": {
"title": "Sender name",
"description": "The name that is configured in Azure Communication Services as the sender name",
"type": "string"
},
"games": {
"title": "Games",
"description": "An array of lottery game definitions",
"type": "array",
"items": {
"title": "Game",
"description": "Defines a type of lottery game with a name and one or more fields",
"type": "object",
"properties": {
"name": {
"title": "Name",
"description": "Refer to a lottery game in the ticket_packs section by this name (must be unique within the games array)",
"type": "string"
},
"fields": {
"title": "Fields",
"description": "An array of field definitions for a type of lottery game",
"type": "array",
"items": {
"title": "Field",
"description": "Players must choose n unique numbers between min and max, inclusive, from each field",
"type": "object",
"properties": {
"n": {
"title": "n",
"description": "This many numbers must be chosen from the field",
"type": "integer"
},
"min": {
"title": "min",
"description": "The lowest possible number that can be chosen from the field",
"type": "integer"
},
"max": {
"title": "max",
"description": "The highest possible number that can be chosen from the field",
"type": "integer"
}
},
"required": ["n", "min", "max"],
"additionalProperties": false
}
}
},
"required": ["name", "fields"],
"additionalProperties": false
}
},
"ticket_packs": {
"title": "Ticket packs",
"description": "An array of lottery ticket pack definitions",
"type": "array",
"items": {
"title": "Ticket pack",
"description": "Defines the elements of a lottery ticket pack and the recipients to send it to",
"type": "object",
"properties": {
"recipients": {
"title": "Recipients",
"description": "An array of recipients",
"type": "array",
"items": {
"title": "Recipient",
"description": "To whom the lottery ticket pack is sent",
"type": "object",
"properties": {
"email": {
"title": "Email",
"description": "The email address of the recipient",
"type": "string",
"format": "email"
},
"name": {
"title": "Name",
"description": "The name of the recipient",
"type": "string"
}
},
"required": ["email", "name"],
"additionalProperties": false
}
},
"elements": {
"title": "Elements",
"description": "Array of lottery ticket pack elements",
"type": "array",
"items": {
"title": "Element",
"description": "Defines the number of randomly generated tickets and the permanently played tickets for a defined lottery game",
"type": "object",
"properties": {
"game": {
"title": "Game",
"description": "The name of a lottery game defined in the games section",
"type": "string"
},
"number_of_random_tickets": {
"title": "Number of random tickets",
"description": "This many tickets will be randomly generated",
"type": "integer"
},
"permanent_tickets": {
"title": "Permanent tickets",
"description": "An array of permanent tickets",
"type": "array",
"items": {
"title": "Permament ticket",
"description": "A ticket to be played every time (must conform to the game definition)",
"type": "array",
"items": {
"title": "Field",
"description": "A field of a permanent ticket",
"type": "array",
"items": {
"title": "Number",
"description": "A number in a field of a permanent ticket",
"type": "number"
}
}
}
}
},
"required": [
"game",
"number_of_random_tickets",
"permanent_tickets"
],
"additionalProperties": false
}
}
},
"required": ["recipients", "elements"],
"additionalProperties": false
}
}
},
"required": [
"random_org_api_key",
"azure_email_endpoint",
"azure_email_key",
"sender_email",
"sender_name",
"games",
"ticket_packs"
],
"additionalProperties": false
}