Browse Source

.

pull/76/head
magicmilo 3 years ago
parent
commit
8517613c64
  1. 61
      config/forms/schema/generic.json
  2. 39
      config/forms/schema/test.json
  3. 9
      spec/fixtures/forms/test_form.json

61
config/forms/schema/generic.json

@ -19,13 +19,13 @@
"type": "integer"
},
"sections": {
"description": "",
"type": "object",
"patternProperties": {
"^[0-9]+$": {
"[a-z_\/#]+": {
"description": "",
"type": "string"
"type": "object"
},
"properties": {
"label": {
"description": "",
"type": "string"
@ -34,62 +34,59 @@
"description": "",
"type": "object",
"patternProperties": {
"^[0-9]+$": {
"[a-z_\/#]+": {
"description": "",
"type": "string"
},
"type": "object",
"required": ["label"],
"properties": {
"label": {
"description": "",
"type": "string"
"type": "string",
"required": "true"
},
"subsections": {
"description": "",
"pages": {
"type": "object",
"required": ["header"],
"patternProperties": {
"^[0-9]+$": {
"description": "",
"type": "string"
},
"label": {
"type": "object",
"[a-z_]+": {
"properties": {
"header": {
"description": "",
"type": "string"
},
"pages": {
"description": "",
"type": "object",
"patternProperties": {
"^[0-9]+$": {
"description": {
"description": "",
"type": "string"
}
},
"questions": {
"description": "",
"type": "object",
"patternProperties": {
"^[0-9]+$": {
"description": "",
"type": "string"
},
"conditional_for": {
"type": "object",
"properties": ""
"[a-z_]+": {
"properties": {
"check_answer_label": {
"type": "string"
}
}
}
},
"conditional_route_to": {
"type": "object",
"properties": ""
"minProperties": 8
},
"default_next_page": {
"type" : "string"
"minProperties": 8
}
}
},
"minProperties": 8
}
}
}
},
"minProperties": 8
}
}
},
"minProperties": 1
}
}
}

39
config/forms/schema/test.json

@ -21,20 +21,18 @@
"sections": {
"type": "object",
"patternProperties": {
"^[0-9]+$": {
"[a-z_\/#]+": {
"description": "",
"type": "string"
},
"type": "object",
"properties": {
"label": {
"description": "",
"type": "string"
},
"subsections": {
"description": "",
"type": "object",
"patternProperties": {
"^[0-9]+$": {
"[a-z_\/#]+": {
"description": "",
"type": "object",
"required": ["label"],
@ -42,40 +40,17 @@
"label": {
"description": "",
"type": "string"
},
"pages": {
"type": "object",
"required": ["header"],
"patternProperties": {
"^[0-9]+$": {
"properties": {
"header": {
"description": "",
"type": "string"
},
"description": {
"description": "",
"type": "string"
},
"questions": {
"type": "object",
"properties": {
}
}
}
}
}
}
}
},
"additionalProperties": false,
"maxProperties": 1,
"minProperties": 1
}
}
}
},
"minProperties": 2
}
},
"minProperties": 1
}
}
}

9
spec/fixtures/forms/test_form.json vendored

@ -9,15 +9,6 @@
"household_characteristics": {
"label": "Household characteristics",
"pages": {
"tenant_code": {
"questions": {
"tenant_code": {
"check_answer_label": "Tenant code",
"header": "What is the tenant code?",
"type": "text"
}
}
}
}
}
}

Loading…
Cancel
Save