Browse Source

Format JSON files to improve readability (#923)

CLDC-858-no-of-beds-validation-sales
Jack S 2 years ago committed by GitHub
parent
commit
a765213178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 585
      config/forms/2021_2022.json
  2. 589
      config/forms/2022_2023.json
  3. 16
      config/forms/schema/2021_2022.json
  4. 21
      config/forms/schema/generic.json
  5. 1251
      spec/fixtures/forms/2021_2022.json
  6. 96
      spec/fixtures/forms/2022_2023.json
  7. 6
      spec/fixtures/forms/test_validator.json

585
config/forms/2021_2022.json

File diff suppressed because it is too large Load Diff

589
config/forms/2022_2023.json

File diff suppressed because it is too large Load Diff

16
config/forms/schema/2021_2022.json

@ -4,7 +4,12 @@
"title": "Form", "title": "Form",
"description": "A form", "description": "A form",
"type": "object", "type": "object",
"required": ["form_type", "start_year", "end_year", "sections"], "required": [
"form_type",
"start_year",
"end_year",
"sections"
],
"properties": { "properties": {
"form_type": { "form_type": {
"description": "", "description": "",
@ -35,7 +40,9 @@
"[a-z_]+": { "[a-z_]+": {
"description": "", "description": "",
"type": "object", "type": "object",
"required": ["label"], "required": [
"label"
],
"properties": { "properties": {
"label": { "label": {
"description": "", "description": "",
@ -62,7 +69,10 @@
"[a-z_]+": { "[a-z_]+": {
"description": "", "description": "",
"type": "object", "type": "object",
"required": ["header", "check_answer_label"], "required": [
"header",
"check_answer_label"
],
"properties": { "properties": {
"check_answer_label": { "check_answer_label": {
"description": "", "description": "",

21
config/forms/schema/generic.json

@ -4,7 +4,12 @@
"title": "Form", "title": "Form",
"description": "A form", "description": "A form",
"type": "object", "type": "object",
"required": ["form_type", "start_year", "end_year", "sections"], "required": [
"form_type",
"start_year",
"end_year",
"sections"
],
"properties": { "properties": {
"form_type": { "form_type": {
"description": "", "description": "",
@ -35,7 +40,9 @@
"[a-z_]+": { "[a-z_]+": {
"description": "SubSection Name", "description": "SubSection Name",
"type": "object", "type": "object",
"required": ["label"], "required": [
"label"
],
"properties": { "properties": {
"label": { "label": {
"description": "", "description": "",
@ -47,7 +54,10 @@
"^(?!(depends_on))[a-z_]+$": { "^(?!(depends_on))[a-z_]+$": {
"description": "Page Name", "description": "Page Name",
"type": "object", "type": "object",
"required": ["header", "questions"], "required": [
"header",
"questions"
],
"properties": { "properties": {
"header": { "header": {
"description": "", "description": "",
@ -63,7 +73,10 @@
"[a-z_]+": { "[a-z_]+": {
"description": "Question Name", "description": "Question Name",
"type": "object", "type": "object",
"required": ["header", "type"], "required": [
"header",
"type"
],
"properties": { "properties": {
"header": { "header": {
"description": "", "description": "",

1251
spec/fixtures/forms/2021_2022.json vendored

File diff suppressed because it is too large Load Diff

96
spec/fixtures/forms/2022_2023.json vendored

@ -1,55 +1,57 @@
{ {
"form_type": "lettings", "form_type": "lettings",
"start_date": "2022-04-01T00:00:00.000+01:00", "start_date": "2022-04-01T00:00:00.000+01:00",
"end_date": "2023-07-01T00:00:00.000+01:00", "end_date": "2023-07-01T00:00:00.000+01:00",
"sections": { "sections": {
"household": { "household": {
"label": "About the household", "label": "About the household",
"subsections": { "subsections": {
"household_characteristics": { "household_characteristics": {
"label": "Household characteristics", "label": "Household characteristics",
"pages": { "pages": {
"tenant_code_test": { "tenant_code_test": {
"questions": { "questions": {
"tenancycode": { "tenancycode": {
"check_answer_label": "Tenant code", "check_answer_label": "Tenant code",
"header": "Different question header text for this year - 2023", "header": "Different question header text for this year - 2023",
"type": "text", "type": "text",
"width": 10 "width": 10
}
} }
},
"outstanding_amount_known": {
"header": "",
"description": "",
"questions": {
"tshortfall_known": {
"check_answer_label": "",
"header": "",
"hint_text": "",
"hidden_in_check_answers": true,
"type": "radio",
"derived": true,
"answer_options": {
"0": {
"value": "Yes"
},
"1": {
"value": "No"
}
}
}
},
"depends_on": [false]
} }
}, },
"depends_on": [ "outstanding_amount_known": {
{ "header": "",
"setup": "completed" "description": "",
} "questions": {
] "tshortfall_known": {
} "check_answer_label": "",
"header": "",
"hint_text": "",
"hidden_in_check_answers": true,
"type": "radio",
"derived": true,
"answer_options": {
"0": {
"value": "Yes"
},
"1": {
"value": "No"
}
}
}
},
"depends_on": [
false
]
}
},
"depends_on": [
{
"setup": "completed"
}
]
} }
} }
} }
} }
}

6
spec/fixtures/forms/test_validator.json vendored

@ -22,7 +22,11 @@
"type": "text" "type": "text"
} }
}, },
"depends_on": [{"test": "Yes"}] "depends_on": [
{
"test": "Yes"
}
]
}, },
"person_1_age": { "person_1_age": {
"header": "", "header": "",

Loading…
Cancel
Save