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",
"description": "A form",
"type": "object",
"required": ["form_type", "start_year", "end_year", "sections"],
"required": [
"form_type",
"start_year",
"end_year",
"sections"
],
"properties": {
"form_type": {
"description": "",
@ -35,7 +40,9 @@
"[a-z_]+": {
"description": "",
"type": "object",
"required": ["label"],
"required": [
"label"
],
"properties": {
"label": {
"description": "",
@ -62,7 +69,10 @@
"[a-z_]+": {
"description": "",
"type": "object",
"required": ["header", "check_answer_label"],
"required": [
"header",
"check_answer_label"
],
"properties": {
"check_answer_label": {
"description": "",

21
config/forms/schema/generic.json

@ -4,7 +4,12 @@
"title": "Form",
"description": "A form",
"type": "object",
"required": ["form_type", "start_year", "end_year", "sections"],
"required": [
"form_type",
"start_year",
"end_year",
"sections"
],
"properties": {
"form_type": {
"description": "",
@ -35,7 +40,9 @@
"[a-z_]+": {
"description": "SubSection Name",
"type": "object",
"required": ["label"],
"required": [
"label"
],
"properties": {
"label": {
"description": "",
@ -47,7 +54,10 @@
"^(?!(depends_on))[a-z_]+$": {
"description": "Page Name",
"type": "object",
"required": ["header", "questions"],
"required": [
"header",
"questions"
],
"properties": {
"header": {
"description": "",
@ -63,7 +73,10 @@
"[a-z_]+": {
"description": "Question Name",
"type": "object",
"required": ["header", "type"],
"required": [
"header",
"type"
],
"properties": {
"header": {
"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",
"start_date": "2022-04-01T00:00:00.000+01:00",
"end_date": "2023-07-01T00:00:00.000+01:00",
"sections": {
"household": {
"label": "About the household",
"subsections": {
"household_characteristics": {
"label": "Household characteristics",
"pages": {
"tenant_code_test": {
"questions": {
"tenancycode": {
"check_answer_label": "Tenant code",
"header": "Different question header text for this year - 2023",
"type": "text",
"width": 10
}
"form_type": "lettings",
"start_date": "2022-04-01T00:00:00.000+01:00",
"end_date": "2023-07-01T00:00:00.000+01:00",
"sections": {
"household": {
"label": "About the household",
"subsections": {
"household_characteristics": {
"label": "Household characteristics",
"pages": {
"tenant_code_test": {
"questions": {
"tenancycode": {
"check_answer_label": "Tenant code",
"header": "Different question header text for this year - 2023",
"type": "text",
"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": [
{
"setup": "completed"
}
]
}
"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": [
{
"setup": "completed"
}
]
}
}
}
}
}

6
spec/fixtures/forms/test_validator.json vendored

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

Loading…
Cancel
Save