/
schema.json
750 lines (750 loc) · 18.5 KB
/
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"required": [
"base_path",
"details",
"document_type",
"publishing_app",
"rendering_app",
"routes",
"schema_name",
"title"
],
"additionalProperties": false,
"properties": {
"access_limited": {
"$ref": "#/definitions/access_limited"
},
"analytics_identifier": {
"$ref": "#/definitions/analytics_identifier"
},
"auth_bypass_ids": {
"description": "A list of ids that will allow access to this item for non-authenticated users",
"$ref": "#/definitions/guid_list"
},
"base_path": {
"$ref": "#/definitions/absolute_path"
},
"bulk_publishing": {
"type": "boolean"
},
"change_note": {
"type": [
"null",
"string"
]
},
"description": {
"$ref": "#/definitions/description_optional"
},
"details": {
"$ref": "#/definitions/details"
},
"document_type": {
"type": "string",
"enum": [
"finder",
"search"
]
},
"first_published_at": {
"$ref": "#/definitions/first_published_at"
},
"last_edited_at": {
"description": "Last time when the content received a major or minor update.",
"type": "string",
"format": "date-time"
},
"links": {
"type": "object",
"additionalProperties": false,
"properties": {
"policy_areas": {
"description": "A largely deprecated tag currently only used to power email alerts.",
"$ref": "#/definitions/guid_list"
}
}
},
"locale": {
"$ref": "#/definitions/locale"
},
"need_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"phase": {
"description": "The service design phase of this content item - https://www.gov.uk/service-manual/phases",
"type": "string",
"enum": [
"alpha",
"beta",
"live"
]
},
"previous_version": {
"type": "string"
},
"public_updated_at": {
"$ref": "#/definitions/public_updated_at"
},
"publishing_app": {
"$ref": "#/definitions/publishing_app_name"
},
"redirects": {
"type": "array",
"additionalItems": false,
"items": {}
},
"rendering_app": {
"$ref": "#/definitions/rendering_app"
},
"routes": {
"$ref": "#/definitions/routes"
},
"schema_name": {
"type": "string",
"enum": [
"finder"
]
},
"title": {
"$ref": "#/definitions/title"
},
"update_type": {
"$ref": "#/definitions/update_type"
}
},
"definitions": {
"description": {
"type": "string"
},
"absolute_path": {
"description": "A path only. Query string and/or fragment are not allowed.",
"type": "string",
"pattern": "^/(([a-zA-Z0-9._~!$&'()*+,;=:@-]|%[0-9a-fA-F]{2})+(/([a-zA-Z0-9._~!$&'()*+,;=:@-]|%[0-9a-fA-F]{2})*)*)?$"
},
"access_limited": {
"type": "object",
"additionalProperties": false,
"properties": {
"auth_bypass_ids": {
"description": "Deprecated: auth_bypass_ids should be sent as a separate field",
"$ref": "#/definitions/guid_list"
},
"organisations": {
"description": "A list of organisation content ids permitted access to this item",
"$ref": "#/definitions/guid_list"
},
"users": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"analytics_identifier": {
"description": "A short identifier we send to Google Analytics for multi-valued fields. This means we avoid the truncated values we would get if we sent the path or slug of eg organisations.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description_optional": {
"anyOf": [
{
"$ref": "#/definitions/description"
},
{
"type": "null"
}
]
},
"details": {
"type": "object",
"required": [
"document_noun",
"facets"
],
"additionalProperties": false,
"properties": {
"beta": {
"$ref": "#/definitions/finder_beta"
},
"beta_message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"canonical_link": {
"type": "boolean"
},
"default_documents_per_page": {
"$ref": "#/definitions/finder_default_documents_per_page"
},
"default_order": {
"$ref": "#/definitions/finder_default_order"
},
"document_noun": {
"$ref": "#/definitions/finder_document_noun"
},
"facets": {
"$ref": "#/definitions/finder_facets"
},
"filter": {
"$ref": "#/definitions/finder_filter"
},
"format_name": {
"type": "string"
},
"generic_description": {
"type": "boolean"
},
"label_text": {
"type": "string"
},
"logo_path": {
"type": "string"
},
"no_index": {
"type": "boolean"
},
"open_filter_on_load": {
"type": "boolean"
},
"reject": {
"$ref": "#/definitions/finder_reject_filter"
},
"show_summaries": {
"$ref": "#/definitions/finder_show_summaries"
},
"signup_link": {
"$ref": "#/definitions/finder_signup_link"
},
"sort": {
"$ref": "#/definitions/finder_sort"
},
"summary": {
"$ref": "#/definitions/finder_summary"
}
}
},
"finder_beta": {
"description": "Indicates if finder is in beta. TODO: Switch to top-level phase label",
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"finder_default_documents_per_page": {
"description": "Specify this to paginate results",
"type": "integer"
},
"finder_default_order": {
"description": "DEPRECATED: Use “sort” property",
"type": "string"
},
"finder_document_noun": {
"description": "How to refer to documents when presenting the search results",
"type": "string"
},
"finder_facets": {
"description": "The facets shown to the user to refine their search.",
"type": "array",
"items": {
"type": "object",
"required": [
"key",
"filterable",
"display_as_result_metadata"
],
"additionalProperties": false,
"properties": {
"allowed_values": {
"description": "Possible values to show for non-dynamic select facets. All values are shown regardless of the search.",
"type": "array",
"items": {
"$ref": "#/definitions/label_value_pair"
}
},
"closed_value": {
"description": "Value that determines the closed state (the key field is in the past) of a topical facet.",
"$ref": "#/definitions/label_value_pair"
},
"combine_mode": {
"description": "Specifies how to combine with other facets",
"type": "string",
"default": "and",
"enum": [
"and",
"or"
]
},
"display_as_result_metadata": {
"description": "Include this in search result metadata. Can be set for non-filterable facets.",
"type": "boolean"
},
"filter_key": {
"description": "The exact rummager field name for this facet. Allows 'key' to be aliased to a rummager filter field",
"type": "string"
},
"filter_value": {
"description": "A preset filter value that is applied when a checkbox is selected",
"type": "string"
},
"filterable": {
"description": "This must be true to show the facet to users.",
"type": "boolean"
},
"hide_facet_tag": {
"description": "Causes the facet to not have a facet tag shown in a finder",
"type": "boolean"
},
"key": {
"description": "The rummager field name used for this facet.",
"type": "string"
},
"keys": {
"description": "Field names used for the taxon drop down.",
"type": "array",
"items": {
"type": "string"
}
},
"large": {
"description": "When set to true, the height of the option select facet will be larger",
"type": "boolean"
},
"name": {
"description": "Label for the facet.",
"type": "string"
},
"open_on_load": {
"description": "When set to true, the option select facet will always be open on page load",
"type": "boolean"
},
"open_value": {
"description": "Value that determines the open state (the key field is in the future) of a topical facet.",
"$ref": "#/definitions/label_value_pair"
},
"option_lookup": {
"description": "A map of keys to values that can be used to associate allowed_values with multiple values",
"type": "object",
"additionalProperties": true,
"patternProperties": {
"^[a-z_]+$": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"preposition": {
"description": "Text used to augment the description of the search when the facet is used.",
"type": "string"
},
"short_name": {
"type": "string"
},
"show_option_select_filter": {
"description": "Controls whether Option Select Facet displays a filter field",
"type": "boolean"
},
"type": {
"description": "Defines the UI component and how the facet is queried from the search API",
"type": "string",
"enum": [
"autocomplete",
"checkbox",
"date",
"hidden",
"hidden_clearable",
"radio",
"research_and_statistics",
"official_documents",
"taxon",
"text",
"topical"
]
}
}
}
},
"finder_filter": {
"description": "This is the fixed filter that scopes the finder",
"type": "object",
"additionalProperties": false,
"properties": {
"all_part_of_taxonomy_tree": {
"type": "array",
"items": {
"type": "string"
}
},
"content_purpose_subgroup": {
"type": "array",
"items": {
"type": "string"
}
},
"content_purpose_supergroup": {
"type": "array",
"items": {
"type": "string"
}
},
"content_store_document_type": {
"type": "array",
"items": {
"type": "string"
}
},
"document_type": {
"type": "string"
},
"email_document_supertype": {
"type": "array",
"items": {
"type": "string"
}
},
"format": {
"type": "string"
},
"has_official_document": {
"type": "boolean"
},
"organisations": {
"type": "array",
"items": {
"type": "string"
}
},
"policies": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"finder_reject_filter": {
"description": "A fixed filter that rejects documents which match the conditions",
"type": "object",
"additionalProperties": false,
"properties": {
"content_purpose_supergroup": {
"type": "array",
"items": {
"type": "string"
}
},
"content_store_document_type": {
"type": "array",
"items": {
"type": "string"
}
},
"email_document_supertype": {
"type": "array",
"items": {
"type": "string"
}
},
"link": {
"type": "array",
"items": {
"type": "string"
}
},
"policies": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"finder_show_summaries": {
"type": "boolean"
},
"finder_signup_link": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"finder_sort": {
"description": "These are the options for sorting the finder",
"type": "array",
"items": {
"type": "object",
"required": [
"key",
"name"
],
"additionalProperties": false,
"properties": {
"default": {
"description": "Indicates if this should be the default sort option",
"type": "boolean"
},
"key": {
"description": "Rummager field name, with an optional preceding “-” to sort in descending order",
"type": "string"
},
"name": {
"description": "Label for the sort option",
"type": "string"
}
}
}
},
"finder_summary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"first_published_at": {
"description": "The date the content was first published. Automatically determined by the publishing-api, unless overridden by the publishing application.",
"type": "string",
"format": "date-time"
},
"guid": {
"type": "string",
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"
},
"guid_list": {
"type": "array",
"items": {
"$ref": "#/definitions/guid"
},
"uniqueItems": true
},
"label_value_pair": {
"description": "One of many possible values a user can select from",
"type": "object",
"required": [
"label",
"value"
],
"additionalProperties": false,
"properties": {
"default": {
"description": "The default option for a radio facet",
"type": "boolean"
},
"label": {
"description": "A human readable label",
"type": "string"
},
"value": {
"description": "A value to use for form controls",
"type": "string"
}
}
},
"locale": {
"type": "string",
"enum": [
"ar",
"az",
"be",
"bg",
"bn",
"cs",
"cy",
"da",
"de",
"dr",
"el",
"en",
"es",
"es-419",
"et",
"fa",
"fi",
"fr",
"gd",
"gu",
"he",
"hi",
"hr",
"hu",
"hy",
"id",
"is",
"it",
"ja",
"ka",
"kk",
"ko",
"lt",
"lv",
"ms",
"mt",
"ne",
"nl",
"no",
"pa",
"pa-pk",
"pl",
"ps",
"pt",
"ro",
"ru",
"si",
"sk",
"sl",
"so",
"sq",
"sr",
"sv",
"sw",
"ta",
"th",
"tk",
"tr",
"uk",
"ur",
"uz",
"vi",
"yi",
"zh",
"zh-hk",
"zh-tw"
]
},
"public_updated_at": {
"description": "When the content was last significantly changed (a major update). Shown to users. Automatically determined by the publishing-api, unless overridden by the publishing application.",
"type": "string",
"format": "date-time"
},
"publishing_app_name": {
"description": "The application that published this item.",
"type": "string",
"enum": [
"account-api",
"calculators",
"calendars",
"collections-publisher",
"contacts",
"content-publisher",
"content-tagger",
"email-alert-frontend",
"external-link-tracker",
"feedback",
"frontend",
"government-frontend",
"hmrc-manuals-api",
"local-links-manager",
"manuals-publisher",
"maslow",
"performanceplatform-big-screen-view",
"publisher",
"rummager",
"search-admin",
"search-api",
"service-manual-publisher",
"share-sale-publisher",
"short-url-manager",
"smartanswers",
"special-route-publisher",
"specialist-publisher",
"static",
"tariff",
"travel-advice-publisher",
"whitehall"
]
},
"rendering_app": {
"description": "The application that renders this item.",
"type": "string",
"enum": [
"account-api",
"calculators",
"calendars",
"collections",
"content-store",
"email-alert-frontend",
"email-campaign-frontend",
"feedback",
"finder-frontend",
"frontend",
"government-frontend",
"info-frontend",
"performanceplatform-big-screen-view",
"rummager",
"search-api",
"smartanswers",
"spotlight",
"static",
"tariff",
"whitehall-admin",
"whitehall-frontend"
]
},
"route": {
"type": "object",
"required": [
"path",
"type"
],
"additionalProperties": false,
"properties": {
"path": {
"type": "string"
},
"type": {
"enum": [
"prefix",
"exact"
]
}
}
},
"routes": {
"type": "array",
"items": {
"$ref": "#/definitions/route"
},
"minItems": 1
},
"title": {
"type": "string"
},
"update_type": {
"enum": [
"major",
"minor",
"republish"
]
}
}
}