@defra/forms-model 3.0.431 → 3.0.433
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/form/form-definition/index.js +2 -1
- package/dist/module/form/form-definition/index.js.map +1 -1
- package/dist/module/form/form-definition/types.js.map +1 -1
- package/dist/module/form/form-editor/index.js +107 -0
- package/dist/module/form/form-editor/index.js.map +1 -1
- package/dist/module/form/form-editor/types.js.map +1 -1
- package/dist/module/form/form-manager/index.js +1 -1
- package/dist/module/form/form-manager/index.js.map +1 -1
- package/dist/types/form/form-definition/index.d.ts.map +1 -1
- package/dist/types/form/form-definition/types.d.ts +1 -0
- package/dist/types/form/form-definition/types.d.ts.map +1 -1
- package/dist/types/form/form-editor/index.d.ts +21 -1
- package/dist/types/form/form-editor/index.d.ts.map +1 -1
- package/dist/types/form/form-editor/types.d.ts +8 -2
- package/dist/types/form/form-editor/types.d.ts.map +1 -1
- package/dist/types/form/form-manager/index.d.ts +1 -1
- package/dist/types/form/form-manager/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/schemas/component-schema-v2.json +162 -0
- package/schemas/component-schema.json +162 -0
- package/schemas/date-sub-schema.json +11 -0
- package/schemas/form-definition-schema.json +1886 -0
- package/schemas/form-definition-v2-payload-schema.json +1469 -0
- package/schemas/form-editor-input-check-answers-setting-schema.json +18 -0
- package/schemas/form-editor-input-page-schema.json +41 -0
- package/schemas/form-editor-input-page-settings-schema.json +28 -0
- package/schemas/form-editor-input-question-schema.json +38 -0
- package/schemas/form-metadata-author-schema.json +24 -0
- package/schemas/form-metadata-contact-schema.json +61 -0
- package/schemas/form-metadata-email-schema.json +25 -0
- package/schemas/form-metadata-input-schema.json +127 -0
- package/schemas/form-metadata-online-schema.json +25 -0
- package/schemas/form-metadata-schema.json +340 -0
- package/schemas/form-metadata-state-schema.json +72 -0
- package/schemas/form-submit-payload-schema.json +124 -0
- package/schemas/form-submit-record-schema.json +30 -0
- package/schemas/form-submit-recordset-schema.json +62 -0
- package/schemas/list-schema-v2.json +496 -0
- package/schemas/list-schema.json +496 -0
- package/schemas/max-future-schema.json +8 -0
- package/schemas/max-length-schema.json +8 -0
- package/schemas/max-past-schema.json +8 -0
- package/schemas/max-schema.json +7 -0
- package/schemas/min-length-schema.json +8 -0
- package/schemas/min-schema.json +7 -0
- package/schemas/page-schema-payload-v2.json +400 -0
- package/schemas/page-schema-v2.json +400 -0
- package/schemas/page-schema.json +400 -0
- package/schemas/page-type-schema.json +11 -0
- package/schemas/pagination-options-schema.json +27 -0
- package/schemas/patch-page-schema.json +26 -0
- package/schemas/query-options-schema.json +94 -0
- package/schemas/question-schema.json +7 -0
- package/schemas/question-type-full-schema.json +22 -0
- package/schemas/question-type-schema.json +20 -0
- package/schemas/search-options-schema.json +59 -0
- package/schemas/sorting-options-schema.json +28 -0
- package/schemas/written-answer-sub-schema.json +12 -0
- package/src/form/form-definition/index.ts +5 -1
- package/src/form/form-definition/types.ts +1 -0
- package/src/form/form-editor/index.ts +147 -1
- package/src/form/form-editor/types.ts +19 -2
- package/src/form/form-manager/index.ts +1 -1
- package/scripts/generate-schemas.js +0 -238
- package/scripts/schema-modules/constants.js +0 -39
- package/scripts/schema-modules/schema-processors.js +0 -109
- package/scripts/schema-modules/schema-simplifiers.js +0 -351
- package/scripts/schema-modules/title-processors.js +0 -327
- package/scripts/schema-modules/types.js +0 -21
- package/scripts/schema-modules/utils.js +0 -41
@@ -0,0 +1,400 @@
|
|
1
|
+
{
|
2
|
+
"type": "object",
|
3
|
+
"description": "Form page definition specifying content and behavior",
|
4
|
+
"properties": {
|
5
|
+
"id": {
|
6
|
+
"type": "string",
|
7
|
+
"description": "Unique identifier for the page",
|
8
|
+
"format": "uuid",
|
9
|
+
"title": "Id"
|
10
|
+
},
|
11
|
+
"path": {
|
12
|
+
"type": "string",
|
13
|
+
"description": "URL path for this page, must not be the reserved \"/status\" path",
|
14
|
+
"not": {
|
15
|
+
"type": "string",
|
16
|
+
"enum": [
|
17
|
+
"/status"
|
18
|
+
]
|
19
|
+
},
|
20
|
+
"title": "Path"
|
21
|
+
},
|
22
|
+
"title": {
|
23
|
+
"type": "string",
|
24
|
+
"description": "Page title displayed at the top of the page",
|
25
|
+
"title": "Title"
|
26
|
+
},
|
27
|
+
"section": {
|
28
|
+
"type": "string",
|
29
|
+
"description": "Section this page belongs to",
|
30
|
+
"title": "Section"
|
31
|
+
},
|
32
|
+
"controller": {
|
33
|
+
"type": "string",
|
34
|
+
"description": "Custom controller class name for special page behavior",
|
35
|
+
"title": "Controller"
|
36
|
+
},
|
37
|
+
"components": {
|
38
|
+
"type": "array",
|
39
|
+
"description": "UI components displayed on this page",
|
40
|
+
"uniqueItems": true,
|
41
|
+
"items": {
|
42
|
+
"type": "object",
|
43
|
+
"description": "Form component definition specifying UI element behavior",
|
44
|
+
"properties": {
|
45
|
+
"id": {
|
46
|
+
"type": "string",
|
47
|
+
"description": "Unique identifier for the component",
|
48
|
+
"format": "uuid",
|
49
|
+
"title": "Id"
|
50
|
+
},
|
51
|
+
"type": {
|
52
|
+
"type": "string",
|
53
|
+
"description": "Component type (TextField, RadioButtons, DateField, etc.)",
|
54
|
+
"title": "Type"
|
55
|
+
},
|
56
|
+
"shortDescription": {
|
57
|
+
"type": "string",
|
58
|
+
"description": "Brief description of the component purpose",
|
59
|
+
"title": "Short Description"
|
60
|
+
},
|
61
|
+
"name": {
|
62
|
+
"type": [
|
63
|
+
"array",
|
64
|
+
"boolean",
|
65
|
+
"number",
|
66
|
+
"object",
|
67
|
+
"string",
|
68
|
+
"null"
|
69
|
+
],
|
70
|
+
"oneOf": [
|
71
|
+
{
|
72
|
+
"type": "string",
|
73
|
+
"description": "Name format for display-only components like HTML, Markdown, etc.",
|
74
|
+
"pattern": "^[a-zA-Z]+$",
|
75
|
+
"title": "Display Component Name"
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"type": "string",
|
79
|
+
"description": "Name format for input components that collect user data.",
|
80
|
+
"pattern": "^[a-zA-Z]+$",
|
81
|
+
"title": "Input Component Name"
|
82
|
+
}
|
83
|
+
],
|
84
|
+
"title": "Name",
|
85
|
+
"description": "The name value.",
|
86
|
+
"oneOfTitles": [
|
87
|
+
"Display Component Name",
|
88
|
+
"Input Component Name"
|
89
|
+
]
|
90
|
+
},
|
91
|
+
"title": {
|
92
|
+
"type": [
|
93
|
+
"array",
|
94
|
+
"boolean",
|
95
|
+
"number",
|
96
|
+
"object",
|
97
|
+
"string",
|
98
|
+
"null"
|
99
|
+
],
|
100
|
+
"oneOf": [
|
101
|
+
{
|
102
|
+
"type": "string",
|
103
|
+
"description": "Title format for display-only components.",
|
104
|
+
"title": "Display Component Title"
|
105
|
+
},
|
106
|
+
{
|
107
|
+
"type": "string",
|
108
|
+
"description": "Title displayed above input components.",
|
109
|
+
"title": "Input Component Title"
|
110
|
+
}
|
111
|
+
],
|
112
|
+
"title": "Title",
|
113
|
+
"description": "The title value.",
|
114
|
+
"oneOfTitles": [
|
115
|
+
"Display Component Title",
|
116
|
+
"Input Component Title"
|
117
|
+
]
|
118
|
+
},
|
119
|
+
"hint": {
|
120
|
+
"type": "string",
|
121
|
+
"description": "Additional guidance text displayed below the component title",
|
122
|
+
"title": "Hint"
|
123
|
+
},
|
124
|
+
"options": {
|
125
|
+
"type": "object",
|
126
|
+
"description": "Component-specific configuration options",
|
127
|
+
"default": {},
|
128
|
+
"properties": {
|
129
|
+
"rows": {
|
130
|
+
"type": "number",
|
131
|
+
"description": "Number of rows for textarea components",
|
132
|
+
"title": "Rows"
|
133
|
+
},
|
134
|
+
"maxWords": {
|
135
|
+
"type": "number",
|
136
|
+
"description": "Maximum number of words allowed in text inputs",
|
137
|
+
"title": "Max Words"
|
138
|
+
},
|
139
|
+
"maxDaysInPast": {
|
140
|
+
"type": "number",
|
141
|
+
"description": "Maximum days in the past allowed for date inputs",
|
142
|
+
"title": "Max Days In Past"
|
143
|
+
},
|
144
|
+
"maxDaysInFuture": {
|
145
|
+
"type": "number",
|
146
|
+
"description": "Maximum days in the future allowed for date inputs",
|
147
|
+
"title": "Max Days In Future"
|
148
|
+
},
|
149
|
+
"customValidationMessage": {
|
150
|
+
"type": "string",
|
151
|
+
"description": "Custom error message for validation failures",
|
152
|
+
"title": "Custom Validation Message"
|
153
|
+
},
|
154
|
+
"customValidationMessages": {
|
155
|
+
"type": "object",
|
156
|
+
"description": "Custom error messages keyed by validation rule name",
|
157
|
+
"properties": {},
|
158
|
+
"additionalProperties": true,
|
159
|
+
"title": "Custom Validation Messages"
|
160
|
+
}
|
161
|
+
},
|
162
|
+
"additionalProperties": true,
|
163
|
+
"title": "Options"
|
164
|
+
},
|
165
|
+
"schema": {
|
166
|
+
"type": "object",
|
167
|
+
"description": "Validation rules for the component",
|
168
|
+
"default": {},
|
169
|
+
"properties": {
|
170
|
+
"min": {
|
171
|
+
"type": "number",
|
172
|
+
"description": "Minimum value or length for validation",
|
173
|
+
"title": "Min"
|
174
|
+
},
|
175
|
+
"max": {
|
176
|
+
"type": "number",
|
177
|
+
"description": "Maximum value or length for validation",
|
178
|
+
"title": "Max"
|
179
|
+
},
|
180
|
+
"length": {
|
181
|
+
"type": "number",
|
182
|
+
"description": "Exact length required for validation",
|
183
|
+
"title": "Length"
|
184
|
+
}
|
185
|
+
},
|
186
|
+
"additionalProperties": true,
|
187
|
+
"title": "Schema"
|
188
|
+
},
|
189
|
+
"list": {
|
190
|
+
"type": "string",
|
191
|
+
"description": "Reference to a predefined list of options for select components",
|
192
|
+
"title": "List"
|
193
|
+
}
|
194
|
+
},
|
195
|
+
"required": [
|
196
|
+
"type"
|
197
|
+
],
|
198
|
+
"additionalProperties": true,
|
199
|
+
"title": "Components Item"
|
200
|
+
},
|
201
|
+
"title": "Components"
|
202
|
+
},
|
203
|
+
"repeat": {
|
204
|
+
"type": "object",
|
205
|
+
"title": "Repeat Configuration",
|
206
|
+
"description": "Configuration for repeatable pages, used with RepeatPageController. Defines how repeatable sections behave including min/max repetitions and display options.\n\nNOTE: This configuration is only used when the 'controller' property is set to 'RepeatPageController'. Otherwise, this property should not be specified.",
|
207
|
+
"oneOfTitles": [
|
208
|
+
"Repeat Configuration",
|
209
|
+
"Alternative Validation"
|
210
|
+
],
|
211
|
+
"properties": {
|
212
|
+
"options": {
|
213
|
+
"type": "object",
|
214
|
+
"description": "Display and identification options for the repetition",
|
215
|
+
"properties": {
|
216
|
+
"name": {
|
217
|
+
"type": "string",
|
218
|
+
"description": "Identifier for the repeatable section, used in data structure",
|
219
|
+
"title": "Name"
|
220
|
+
},
|
221
|
+
"title": {
|
222
|
+
"type": "string",
|
223
|
+
"description": "Title displayed for each repeatable item",
|
224
|
+
"title": "Title"
|
225
|
+
}
|
226
|
+
},
|
227
|
+
"required": [
|
228
|
+
"name",
|
229
|
+
"title"
|
230
|
+
],
|
231
|
+
"additionalProperties": false,
|
232
|
+
"title": "Options"
|
233
|
+
},
|
234
|
+
"schema": {
|
235
|
+
"type": "object",
|
236
|
+
"description": "Validation constraints for the number of repetitions",
|
237
|
+
"properties": {
|
238
|
+
"min": {
|
239
|
+
"type": "number",
|
240
|
+
"description": "Minimum number of repetitions required",
|
241
|
+
"title": "Min"
|
242
|
+
},
|
243
|
+
"max": {
|
244
|
+
"type": "number",
|
245
|
+
"description": "Maximum number of repetitions allowed",
|
246
|
+
"title": "Max"
|
247
|
+
}
|
248
|
+
},
|
249
|
+
"required": [
|
250
|
+
"min",
|
251
|
+
"max"
|
252
|
+
],
|
253
|
+
"additionalProperties": false,
|
254
|
+
"title": "Schema"
|
255
|
+
}
|
256
|
+
},
|
257
|
+
"required": [
|
258
|
+
"options",
|
259
|
+
"schema"
|
260
|
+
],
|
261
|
+
"additionalProperties": false
|
262
|
+
},
|
263
|
+
"condition": {
|
264
|
+
"type": "string",
|
265
|
+
"description": "Optional condition that determines if this page is shown",
|
266
|
+
"title": "Condition"
|
267
|
+
},
|
268
|
+
"next": {
|
269
|
+
"type": "array",
|
270
|
+
"description": "Possible navigation paths after this page",
|
271
|
+
"default": [],
|
272
|
+
"items": {
|
273
|
+
"type": "object",
|
274
|
+
"description": "Navigation link defining where to go after completing a page",
|
275
|
+
"properties": {
|
276
|
+
"path": {
|
277
|
+
"type": "string",
|
278
|
+
"description": "The target page path to navigate to",
|
279
|
+
"title": "Path"
|
280
|
+
},
|
281
|
+
"condition": {
|
282
|
+
"type": "string",
|
283
|
+
"description": "Optional condition that determines if this path should be taken",
|
284
|
+
"title": "Condition"
|
285
|
+
},
|
286
|
+
"redirect": {
|
287
|
+
"type": "string",
|
288
|
+
"description": "Optional external URL to redirect to instead of an internal page",
|
289
|
+
"title": "Redirect"
|
290
|
+
}
|
291
|
+
},
|
292
|
+
"required": [
|
293
|
+
"path"
|
294
|
+
],
|
295
|
+
"additionalProperties": false,
|
296
|
+
"title": "Next Item"
|
297
|
+
},
|
298
|
+
"title": "Next"
|
299
|
+
},
|
300
|
+
"events": {
|
301
|
+
"type": "object",
|
302
|
+
"description": "Event handlers for page lifecycle events",
|
303
|
+
"properties": {
|
304
|
+
"onLoad": {
|
305
|
+
"type": "object",
|
306
|
+
"description": "Event handler triggered when the page is loaded",
|
307
|
+
"properties": {
|
308
|
+
"type": {
|
309
|
+
"type": "string",
|
310
|
+
"description": "Type of the event handler (currently only \"http\" supported)",
|
311
|
+
"title": "Type"
|
312
|
+
},
|
313
|
+
"options": {
|
314
|
+
"type": "object",
|
315
|
+
"description": "Options specific to the event handler type",
|
316
|
+
"properties": {
|
317
|
+
"method": {
|
318
|
+
"type": "string",
|
319
|
+
"description": "HTTP method to use for the request",
|
320
|
+
"title": "Method"
|
321
|
+
},
|
322
|
+
"url": {
|
323
|
+
"type": "string",
|
324
|
+
"description": "URL endpoint to call when the event fires",
|
325
|
+
"format": "uri",
|
326
|
+
"title": "Url"
|
327
|
+
}
|
328
|
+
},
|
329
|
+
"required": [
|
330
|
+
"method",
|
331
|
+
"url"
|
332
|
+
],
|
333
|
+
"additionalProperties": false,
|
334
|
+
"title": "Options"
|
335
|
+
}
|
336
|
+
},
|
337
|
+
"required": [
|
338
|
+
"type"
|
339
|
+
],
|
340
|
+
"additionalProperties": false,
|
341
|
+
"title": "On Load"
|
342
|
+
},
|
343
|
+
"onSave": {
|
344
|
+
"type": "object",
|
345
|
+
"description": "Event handler triggered when the page data is saved",
|
346
|
+
"properties": {
|
347
|
+
"type": {
|
348
|
+
"type": "string",
|
349
|
+
"description": "Type of the event handler (currently only \"http\" supported)",
|
350
|
+
"title": "Type"
|
351
|
+
},
|
352
|
+
"options": {
|
353
|
+
"type": "object",
|
354
|
+
"description": "Options specific to the event handler type",
|
355
|
+
"properties": {
|
356
|
+
"method": {
|
357
|
+
"type": "string",
|
358
|
+
"description": "HTTP method to use for the request",
|
359
|
+
"title": "Method"
|
360
|
+
},
|
361
|
+
"url": {
|
362
|
+
"type": "string",
|
363
|
+
"description": "URL endpoint to call when the event fires",
|
364
|
+
"format": "uri",
|
365
|
+
"title": "Url"
|
366
|
+
}
|
367
|
+
},
|
368
|
+
"required": [
|
369
|
+
"method",
|
370
|
+
"url"
|
371
|
+
],
|
372
|
+
"additionalProperties": false,
|
373
|
+
"title": "Options"
|
374
|
+
}
|
375
|
+
},
|
376
|
+
"required": [
|
377
|
+
"type"
|
378
|
+
],
|
379
|
+
"additionalProperties": false,
|
380
|
+
"title": "On Save"
|
381
|
+
}
|
382
|
+
},
|
383
|
+
"additionalProperties": false,
|
384
|
+
"title": "Events"
|
385
|
+
},
|
386
|
+
"view": {
|
387
|
+
"type": "string",
|
388
|
+
"description": "Optional custom view template to use for rendering this page",
|
389
|
+
"title": "View"
|
390
|
+
}
|
391
|
+
},
|
392
|
+
"required": [
|
393
|
+
"path",
|
394
|
+
"title"
|
395
|
+
],
|
396
|
+
"additionalProperties": false,
|
397
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
398
|
+
"title": "Page Schema",
|
399
|
+
"$id": "@defra/forms-model/schemas/page-schema.json"
|
400
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"type": "string",
|
3
|
+
"description": "Type of page - either a question page or guidance page",
|
4
|
+
"enum": [
|
5
|
+
"question",
|
6
|
+
"guidance"
|
7
|
+
],
|
8
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
9
|
+
"title": "Page Type Schema",
|
10
|
+
"$id": "@defra/forms-model/schemas/page-type-schema.json"
|
11
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
{
|
2
|
+
"type": "object",
|
3
|
+
"properties": {
|
4
|
+
"page": {
|
5
|
+
"type": "number",
|
6
|
+
"description": "Current page number, starting from 1",
|
7
|
+
"default": 1,
|
8
|
+
"exclusiveMinimum": 0,
|
9
|
+
"minimum": 1,
|
10
|
+
"title": "Page"
|
11
|
+
},
|
12
|
+
"perPage": {
|
13
|
+
"type": "number",
|
14
|
+
"description": "Number of items to display per page, between 1 and 200",
|
15
|
+
"default": 24,
|
16
|
+
"exclusiveMinimum": 0,
|
17
|
+
"minimum": 1,
|
18
|
+
"maximum": 200,
|
19
|
+
"title": "Per Page"
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"additionalProperties": false,
|
23
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
24
|
+
"title": "Pagination Options Schema",
|
25
|
+
"description": "JSON Schema for validating Pagination Options Schema in Defra forms",
|
26
|
+
"$id": "@defra/forms-model/schemas/pagination-options-schema.json"
|
27
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"type": "object",
|
3
|
+
"description": "Schema for partially updating a page, requiring at least one field to be provided",
|
4
|
+
"properties": {
|
5
|
+
"title": {
|
6
|
+
"type": "string",
|
7
|
+
"description": "New title to set for the page",
|
8
|
+
"title": "Title"
|
9
|
+
},
|
10
|
+
"path": {
|
11
|
+
"type": "string",
|
12
|
+
"description": "New URL path to set for the page",
|
13
|
+
"not": {
|
14
|
+
"type": "string",
|
15
|
+
"enum": [
|
16
|
+
"/status"
|
17
|
+
]
|
18
|
+
},
|
19
|
+
"title": "Path"
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"additionalProperties": false,
|
23
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
24
|
+
"title": "Patch Page Schema",
|
25
|
+
"$id": "@defra/forms-model/schemas/patch-page-schema.json"
|
26
|
+
}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
{
|
2
|
+
"type": "object",
|
3
|
+
"properties": {
|
4
|
+
"page": {
|
5
|
+
"type": "number",
|
6
|
+
"description": "Current page number, starting from 1",
|
7
|
+
"default": 1,
|
8
|
+
"exclusiveMinimum": 0,
|
9
|
+
"minimum": 1,
|
10
|
+
"title": "Page"
|
11
|
+
},
|
12
|
+
"perPage": {
|
13
|
+
"type": "number",
|
14
|
+
"description": "Number of items to display per page, between 1 and 200",
|
15
|
+
"default": 24,
|
16
|
+
"exclusiveMinimum": 0,
|
17
|
+
"minimum": 1,
|
18
|
+
"maximum": 200,
|
19
|
+
"title": "Per Page"
|
20
|
+
},
|
21
|
+
"sortBy": {
|
22
|
+
"type": "string",
|
23
|
+
"description": "Field to sort results by",
|
24
|
+
"enum": [
|
25
|
+
"updatedAt",
|
26
|
+
"title"
|
27
|
+
],
|
28
|
+
"title": "Sort By"
|
29
|
+
},
|
30
|
+
"order": {
|
31
|
+
"type": "string",
|
32
|
+
"description": "Sort order (ascending or descending)",
|
33
|
+
"enum": [
|
34
|
+
"asc",
|
35
|
+
"desc"
|
36
|
+
],
|
37
|
+
"title": "Order"
|
38
|
+
},
|
39
|
+
"title": {
|
40
|
+
"type": "string",
|
41
|
+
"description": "Search by form title, empty string matches all",
|
42
|
+
"default": "",
|
43
|
+
"maxLength": 255,
|
44
|
+
"title": "Title"
|
45
|
+
},
|
46
|
+
"author": {
|
47
|
+
"type": "string",
|
48
|
+
"description": "Search by form author, empty string matches all",
|
49
|
+
"default": "",
|
50
|
+
"maxLength": 100,
|
51
|
+
"title": "Author"
|
52
|
+
},
|
53
|
+
"organisations": {
|
54
|
+
"type": "array",
|
55
|
+
"description": "Filter by organisation(s), empty array matches all",
|
56
|
+
"default": [],
|
57
|
+
"items": {
|
58
|
+
"type": "string",
|
59
|
+
"enum": [
|
60
|
+
"Animal and Plant Health Agency – APHA",
|
61
|
+
"Centre for Environment, Fisheries and Aquaculture Science – Cefas",
|
62
|
+
"Defra",
|
63
|
+
"Environment Agency",
|
64
|
+
"Forestry Commission",
|
65
|
+
"Marine Management Organisation – MMO",
|
66
|
+
"Natural England",
|
67
|
+
"Rural Payments Agency – RPA",
|
68
|
+
"Veterinary Medicines Directorate – VMD"
|
69
|
+
],
|
70
|
+
"title": "Organisations Item"
|
71
|
+
},
|
72
|
+
"title": "Organisations"
|
73
|
+
},
|
74
|
+
"status": {
|
75
|
+
"type": "array",
|
76
|
+
"description": "Filter by form status(es), empty array matches all",
|
77
|
+
"default": [],
|
78
|
+
"items": {
|
79
|
+
"type": "string",
|
80
|
+
"enum": [
|
81
|
+
"draft",
|
82
|
+
"live"
|
83
|
+
],
|
84
|
+
"title": "Status Item"
|
85
|
+
},
|
86
|
+
"title": "Status"
|
87
|
+
}
|
88
|
+
},
|
89
|
+
"additionalProperties": false,
|
90
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
91
|
+
"title": "Query Options Schema",
|
92
|
+
"description": "JSON Schema for validating Query Options Schema in Defra forms",
|
93
|
+
"$id": "@defra/forms-model/schemas/query-options-schema.json"
|
94
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"type": "string",
|
3
|
+
"description": "The specific component type to use for this question",
|
4
|
+
"enum": [
|
5
|
+
"TextField",
|
6
|
+
"MultilineTextField",
|
7
|
+
"NumberField",
|
8
|
+
"DatePartsField",
|
9
|
+
"MonthYearField",
|
10
|
+
"UkAddressField",
|
11
|
+
"TelephoneNumberField",
|
12
|
+
"FileUploadField",
|
13
|
+
"EmailAddressField",
|
14
|
+
"YesNoField",
|
15
|
+
"CheckboxesField",
|
16
|
+
"RadiosField",
|
17
|
+
"AutocompleteField"
|
18
|
+
],
|
19
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
20
|
+
"title": "Question Type Full Schema",
|
21
|
+
"$id": "@defra/forms-model/schemas/question-type-full-schema.json"
|
22
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"type": "string",
|
3
|
+
"description": "The high-level type of question, including grouped types",
|
4
|
+
"enum": [
|
5
|
+
"writtenAnswerSub",
|
6
|
+
"dateSub",
|
7
|
+
"UkAddressField",
|
8
|
+
"TelephoneNumberField",
|
9
|
+
"FileUploadField",
|
10
|
+
"EmailAddressField",
|
11
|
+
"listSub",
|
12
|
+
"YesNoField",
|
13
|
+
"CheckboxesField",
|
14
|
+
"RadiosField",
|
15
|
+
"AutocompleteField"
|
16
|
+
],
|
17
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
18
|
+
"title": "Question Type Schema",
|
19
|
+
"$id": "@defra/forms-model/schemas/question-type-schema.json"
|
20
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
{
|
2
|
+
"type": "object",
|
3
|
+
"properties": {
|
4
|
+
"title": {
|
5
|
+
"type": "string",
|
6
|
+
"description": "Search by form title, empty string matches all",
|
7
|
+
"default": "",
|
8
|
+
"maxLength": 255,
|
9
|
+
"title": "Title"
|
10
|
+
},
|
11
|
+
"author": {
|
12
|
+
"type": "string",
|
13
|
+
"description": "Search by form author, empty string matches all",
|
14
|
+
"default": "",
|
15
|
+
"maxLength": 100,
|
16
|
+
"title": "Author"
|
17
|
+
},
|
18
|
+
"organisations": {
|
19
|
+
"type": "array",
|
20
|
+
"description": "Filter by organisation(s), empty array matches all",
|
21
|
+
"default": [],
|
22
|
+
"items": {
|
23
|
+
"type": "string",
|
24
|
+
"enum": [
|
25
|
+
"Animal and Plant Health Agency – APHA",
|
26
|
+
"Centre for Environment, Fisheries and Aquaculture Science – Cefas",
|
27
|
+
"Defra",
|
28
|
+
"Environment Agency",
|
29
|
+
"Forestry Commission",
|
30
|
+
"Marine Management Organisation – MMO",
|
31
|
+
"Natural England",
|
32
|
+
"Rural Payments Agency – RPA",
|
33
|
+
"Veterinary Medicines Directorate – VMD"
|
34
|
+
],
|
35
|
+
"title": "Organisations Item"
|
36
|
+
},
|
37
|
+
"title": "Organisations"
|
38
|
+
},
|
39
|
+
"status": {
|
40
|
+
"type": "array",
|
41
|
+
"description": "Filter by form status(es), empty array matches all",
|
42
|
+
"default": [],
|
43
|
+
"items": {
|
44
|
+
"type": "string",
|
45
|
+
"enum": [
|
46
|
+
"draft",
|
47
|
+
"live"
|
48
|
+
],
|
49
|
+
"title": "Status Item"
|
50
|
+
},
|
51
|
+
"title": "Status"
|
52
|
+
}
|
53
|
+
},
|
54
|
+
"additionalProperties": false,
|
55
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
56
|
+
"title": "Search Options Schema",
|
57
|
+
"description": "JSON Schema for validating Search Options Schema in Defra forms",
|
58
|
+
"$id": "@defra/forms-model/schemas/search-options-schema.json"
|
59
|
+
}
|