metadata_presenter 1.7.3 → 1.7.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf6c41a569262e3d405b1611d563f30f4e0c5a13134c920349a24a1c2f3365e1
4
- data.tar.gz: ac8d4ea6aa1aa1aca3c942ad098ee35b4f680668de3e53b087efc3ae10bb2c1d
3
+ metadata.gz: f3ed3876afc6593e2b6108203f7b46401212fc213191d6db6c9a7f3322f6b342
4
+ data.tar.gz: c60618fb9af15d327a198cc8cbcbca389ffc7f3554a1bdcf63596b8d024ef727
5
5
  SHA512:
6
- metadata.gz: 07f84b9e3fa53d81c7acbc2b108926581d0be3d2ec8d6123afbdc63fdffdef32b1e4c8104a276c454735639c3f580764efbb482ac68347362a640d6406e7c65a
7
- data.tar.gz: 29f2f870b2b832bec55069adf227d6de566deb80341d96987f8cd7ef108414db31ed21bde0b4d076f2593ace47498af2d4c4b2f815941ceb1c46f3197a235955
6
+ metadata.gz: 2d294dd3c15cac7c56a99c37b0c59d58a4bfba7ecec43ef17548b587e74113e9b1161a99722b5da9c2d3593623e0aa425f8a55b8778364541a859dd9784cd03a
7
+ data.tar.gz: 35a4408bbe40c5d13cd7bde8924a70380f6ac9d19356050211e1b6ee5683595f5b709b5a275fa7e3d74dac373578d96b8c8af3d08c39775f5d9a286844777159
@@ -1,7 +1,7 @@
1
1
  module MetadataPresenter
2
2
  class Flow < MetadataPresenter::Metadata
3
3
  def branch?
4
- type == 'branch'
4
+ type == 'flow.branch'
5
5
  end
6
6
 
7
7
  def default_next
@@ -0,0 +1,8 @@
1
+ {
2
+ "_id": "flow.branch",
3
+ "_type": "flow.branch",
4
+ "next": {
5
+ "default": "",
6
+ "conditions": []
7
+ }
8
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "condition_type": "",
3
+ "next": "",
4
+ "criterias": []
5
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "operator": "",
3
+ "page": "",
4
+ "component": "",
5
+ "field": ""
6
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "_id": "flow.page",
3
+ "_type": "flow.page",
4
+ "next": {
5
+ "default": ""
6
+ }
7
+ }
@@ -3,25 +3,25 @@
3
3
  "_type": "service.base",
4
4
  "flow": {
5
5
  "cf6dc32f-502c-4215-8c27-1151a45735bb": {
6
- "_type": "page",
6
+ "_type": "flow.page",
7
7
  "next": {
8
8
  "default": "9e1ba77f-f1e5-42f4-b090-437aa9af7f73"
9
9
  }
10
10
  },
11
11
  "9e1ba77f-f1e5-42f4-b090-437aa9af7f73": {
12
- "_type": "page",
12
+ "_type": "flow.page",
13
13
  "next": {
14
14
  "default": "68fbb180-9a2a-48f6-9da6-545e28b8d35a"
15
15
  }
16
16
  },
17
17
  "68fbb180-9a2a-48f6-9da6-545e28b8d35a": {
18
- "_type": "page",
18
+ "_type": "flow.page",
19
19
  "next": {
20
20
  "default": "09e91fd9-7a46-4840-adbc-244d545cfef7"
21
21
  }
22
22
  },
23
23
  "09e91fd9-7a46-4840-adbc-244d545cfef7": {
24
- "_type": "branch",
24
+ "_type": "flow.branch",
25
25
  "next": {
26
26
  "default": "0b297048-aa4d-49b6-ac74-18e069118185",
27
27
  "conditions": [
@@ -41,19 +41,19 @@
41
41
  }
42
42
  },
43
43
  "e8708909-922e-4eaf-87a5-096f7a713fcb": {
44
- "_type": "page",
44
+ "_type": "flow.page",
45
45
  "next": {
46
46
  "default": "0b297048-aa4d-49b6-ac74-18e069118185"
47
47
  }
48
48
  },
49
49
  "0b297048-aa4d-49b6-ac74-18e069118185": {
50
- "_type": "page",
50
+ "_type": "flow.page",
51
51
  "next": {
52
52
  "default": "ffadeb22-063b-4e4f-9502-bd753c706b1d"
53
53
  }
54
54
  },
55
55
  "ffadeb22-063b-4e4f-9502-bd753c706b1d": {
56
- "_type": "branch",
56
+ "_type": "flow.branch",
57
57
  "next": {
58
58
  "default": "05c3306c-0a39-42d2-9e0f-93fd49248f4e",
59
59
  "conditions": [
@@ -85,25 +85,25 @@
85
85
  }
86
86
  },
87
87
  "d4342dfd-0d09-4a91-a0ea-d7fd67e706cc": {
88
- "_type": "page",
88
+ "_type": "flow.page",
89
89
  "next": {
90
90
  "default": "05c3306c-0a39-42d2-9e0f-93fd49248f4e"
91
91
  }
92
92
  },
93
93
  "91e9f7c6-2f75-4b7d-9eb5-0cf352f7be66": {
94
- "_type": "page",
94
+ "_type": "flow.page",
95
95
  "next": {
96
96
  "default": "05c3306c-0a39-42d2-9e0f-93fd49248f4e"
97
97
  }
98
98
  },
99
99
  "05c3306c-0a39-42d2-9e0f-93fd49248f4e": {
100
- "_type": "page",
100
+ "_type": "flow.page",
101
101
  "next": {
102
102
  "default": "1d02e508-5953-4eca-af2f-9d67511c8648"
103
103
  }
104
104
  },
105
105
  "1d02e508-5953-4eca-af2f-9d67511c8648": {
106
- "_type": "branch",
106
+ "_type": "flow.branch",
107
107
  "next": {
108
108
  "default": "ef2cafe3-37e2-4533-9b0c-09a970cd38d4",
109
109
  "conditions": [
@@ -123,19 +123,19 @@
123
123
  }
124
124
  },
125
125
  "8002df6e-29ab-4cdf-b520-1d7bb931a28f": {
126
- "_type": "page",
126
+ "_type": "flow.page",
127
127
  "next": {
128
128
  "default": "ef2cafe3-37e2-4533-9b0c-09a970cd38d4"
129
129
  }
130
130
  },
131
131
  "ef2cafe3-37e2-4533-9b0c-09a970cd38d4": {
132
- "_type": "page",
132
+ "_type": "flow.page",
133
133
  "next": {
134
134
  "default": "cf8b3e18-dacf-4e91-92e1-018035961003"
135
135
  }
136
136
  },
137
137
  "cf8b3e18-dacf-4e91-92e1-018035961003": {
138
- "_type": "branch",
138
+ "_type": "flow.branch",
139
139
  "next": {
140
140
  "default": "0c022e95-0748-4dda-8ba5-12fd1d2f596b",
141
141
  "conditions": [
@@ -155,19 +155,19 @@
155
155
  }
156
156
  },
157
157
  "b5efc09c-ece7-45ae-b0b3-8a7905e25040": {
158
- "_type": "page",
158
+ "_type": "flow.page",
159
159
  "next": {
160
160
  "default": "0c022e95-0748-4dda-8ba5-12fd1d2f596b"
161
161
  }
162
162
  },
163
163
  "0c022e95-0748-4dda-8ba5-12fd1d2f596b": {
164
- "_type": "page",
164
+ "_type": "flow.page",
165
165
  "next": {
166
166
  "default": "618b7537-b42b-4551-ae7d-053afa4d9ca9"
167
167
  }
168
168
  },
169
169
  "618b7537-b42b-4551-ae7d-053afa4d9ca9": {
170
- "_type": "branch",
170
+ "_type": "flow.branch",
171
171
  "next": {
172
172
  "default": "dc7454f9-4186-48d7-b055-684d57bbcdc7",
173
173
  "conditions": [
@@ -199,25 +199,25 @@
199
199
  }
200
200
  },
201
201
  "bc666714-c0a2-4674-afe5-faff2e20d847": {
202
- "_type": "page",
202
+ "_type": "flow.page",
203
203
  "next": {
204
204
  "default": "dc7454f9-4186-48d7-b055-684d57bbcdc7"
205
205
  }
206
206
  },
207
207
  "e2887f44-5e8d-4dc0-b1de-496ab6039430": {
208
- "_type": "page",
208
+ "_type": "flow.page",
209
209
  "next": {
210
210
  "default": "dc7454f9-4186-48d7-b055-684d57bbcdc7"
211
211
  }
212
212
  },
213
213
  "dc7454f9-4186-48d7-b055-684d57bbcdc7": {
214
- "_type": "page",
214
+ "_type": "flow.page",
215
215
  "next": {
216
216
  "default": "84a347fc-8d4b-486a-9996-6a86fa9544c5"
217
217
  }
218
218
  },
219
219
  "84a347fc-8d4b-486a-9996-6a86fa9544c5": {
220
- "_type": "branch",
220
+ "_type": "flow.branch",
221
221
  "next": {
222
222
  "default": "48357db5-7c06-4e85-94b1-5e1c9d8f39eb",
223
223
  "conditions": [
@@ -261,25 +261,25 @@
261
261
  }
262
262
  },
263
263
  "2cc66e51-2c14-4023-86bf-ded49887cdb2": {
264
- "_type": "page",
264
+ "_type": "flow.page",
265
265
  "next": {
266
266
  "default": "48357db5-7c06-4e85-94b1-5e1c9d8f39eb"
267
267
  }
268
268
  },
269
269
  "f6c51f88-7be8-4cb7-bbfc-6c905727a051": {
270
- "_type": "page",
270
+ "_type": "flow.page",
271
271
  "next": {
272
272
  "default": "48357db5-7c06-4e85-94b1-5e1c9d8f39eb"
273
273
  }
274
274
  },
275
275
  "48357db5-7c06-4e85-94b1-5e1c9d8f39eb": {
276
- "_type": "page",
276
+ "_type": "flow.page",
277
277
  "next": {
278
278
  "default": "1079b5b8-abd0-4bf6-aaac-1f01e69e3b39"
279
279
  }
280
280
  },
281
281
  "1079b5b8-abd0-4bf6-aaac-1f01e69e3b39": {
282
- "_type": "branch",
282
+ "_type": "flow.branch",
283
283
  "next": {
284
284
  "default": "941137d7-a1da-43fd-994a-98a4f9ea6d46",
285
285
  "conditions": [
@@ -329,31 +329,31 @@
329
329
  }
330
330
  },
331
331
  "941137d7-a1da-43fd-994a-98a4f9ea6d46": {
332
- "_type": "page",
332
+ "_type": "flow.page",
333
333
  "next": {
334
334
  "default": "e337070b-f636-49a3-a65c-f506675265f0"
335
335
  }
336
336
  },
337
337
  "56e80942-d0a4-405a-85cd-bd1b100013d6": {
338
- "_type": "page",
338
+ "_type": "flow.page",
339
339
  "next": {
340
340
  "default": "e337070b-f636-49a3-a65c-f506675265f0"
341
341
  }
342
342
  },
343
343
  "6324cca4-7770-4765-89b9-1cdc41f49c8b": {
344
- "_type": "page",
344
+ "_type": "flow.page",
345
345
  "next": {
346
346
  "default": "e337070b-f636-49a3-a65c-f506675265f0"
347
347
  }
348
348
  },
349
349
  "e337070b-f636-49a3-a65c-f506675265f0": {
350
- "_type": "page",
350
+ "_type": "flow.page",
351
351
  "next": {
352
352
  "default": "778e364b-9a7f-4829-8eb2-510e08f156a3"
353
353
  }
354
354
  },
355
355
  "778e364b-9a7f-4829-8eb2-510e08f156a3": {
356
- "_type": "page",
356
+ "_type": "flow.page",
357
357
  "next": {
358
358
  "default": ""
359
359
  }
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '1.7.3'.freeze
2
+ VERSION = '1.7.4'.freeze
3
3
  end
@@ -0,0 +1,75 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/flow/branch",
3
+ "_name": "flow.branch",
4
+ "title": "Flow branching object",
5
+ "description": "Flow object that represents a branching object",
6
+ "type": "object",
7
+ "properties": {
8
+ "_type": {
9
+ "type": "string",
10
+ "const": "flow.branch"
11
+ },
12
+ "next": {
13
+ "type": "object",
14
+ "properties": {
15
+ "default": {
16
+ "type": "string"
17
+ },
18
+ "conditions": {
19
+ "$ref": "#/definitions/conditions"
20
+ }
21
+ }
22
+ }
23
+ },
24
+ "additionalProperties": false,
25
+ "definitions": {
26
+ "conditions": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "object",
30
+ "properties": {
31
+ "condition_type": {
32
+ "type": "string",
33
+ "enum": [
34
+ "if",
35
+ "and",
36
+ "or"
37
+ ]
38
+ },
39
+ "next": {
40
+ "type": "string"
41
+ },
42
+ "criterias": {
43
+ "$ref": "#/definitions/criterias"
44
+ }
45
+ }
46
+ }
47
+ },
48
+ "criterias": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "object",
52
+ "properties": {
53
+ "operator": {
54
+ "type": "string",
55
+ "enum": [
56
+ "is",
57
+ "is_not",
58
+ "is_answered",
59
+ "is_not_answered"
60
+ ],
61
+ "page": {
62
+ "type": "string"
63
+ },
64
+ "component": {
65
+ "type": "string"
66
+ },
67
+ "field": {
68
+ "type": "string"
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/flow/page",
3
+ "_name": "flow.page",
4
+ "title": "Flow page object",
5
+ "description": "Flow object that represents a page",
6
+ "type": "object",
7
+ "properties": {
8
+ "_type": {
9
+ "type": "string",
10
+ "const": "flow.page"
11
+ },
12
+ "next": {
13
+ "type": "object",
14
+ "properties": {
15
+ "default": {
16
+ "type": "string"
17
+ }
18
+ }
19
+ }
20
+ },
21
+ "additionalProperties": false
22
+ }
@@ -32,6 +32,19 @@
32
32
  "configuration": {
33
33
  "$ref": "configuration"
34
34
  },
35
+ "flow": {
36
+ "type": "object",
37
+ "items": {
38
+ "anyOf": [
39
+ {
40
+ "$ref": "flow.page"
41
+ },
42
+ {
43
+ "$ref": "flow.branch"
44
+ }
45
+ ]
46
+ }
47
+ },
35
48
  "pages": {
36
49
  "type": "array",
37
50
  "items": {
@@ -77,6 +90,5 @@
77
90
  "configuration",
78
91
  "pages",
79
92
  "standalone_pages"
80
- ],
81
- "additionalProperties": false
93
+ ]
82
94
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metadata_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.3
4
+ version: 1.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Online
@@ -358,6 +358,10 @@ files:
358
358
  - default_metadata/config/service.json
359
359
  - default_metadata/definition/checkbox.json
360
360
  - default_metadata/definition/radio.json
361
+ - default_metadata/flow/branch.json
362
+ - default_metadata/flow/condition.json
363
+ - default_metadata/flow/criteria.json
364
+ - default_metadata/flow/page.json
361
365
  - default_metadata/page/checkanswers.json
362
366
  - default_metadata/page/confirmation.json
363
367
  - default_metadata/page/content.json
@@ -434,6 +438,8 @@ files:
434
438
  - schemas/definition/width_class.input.json
435
439
  - schemas/definition/width_class.json
436
440
  - schemas/errors/errors.json
441
+ - schemas/flow/branch.json
442
+ - schemas/flow/page.json
437
443
  - schemas/link/link.json
438
444
  - schemas/page/checkanswers.json
439
445
  - schemas/page/confirmation.json