Browse Source

more fix

pull/76/head
magicmilo 3 years ago
parent
commit
967ee6b0e1
  1. 4
      app/helpers/json_schema_validation.rb
  2. 31
      spec/fixtures/forms/test_validator.json

4
app/helpers/json_schema_validation.rb

@ -28,8 +28,8 @@ begin
return
end
# directories = ["config/forms", "spec/fixtures/forms"]
directories = ["config/forms"]
directories = ["config/forms", "spec/fixtures/forms"]
# directories = ["config/forms"]
get_all_form_paths(directories).each do |path|
puts path

31
spec/fixtures/forms/test_validator.json vendored

@ -11,30 +11,33 @@
"ShouldThrowError": "Shouldn't be here but what you gonna do?",
"pages": {
"tenant_code": {
"header": "",
"description": "",
"ShouldThrowError": "Shouldn't be here but what you gonna do?",
"questions": {
"tenant_code": {
"check_answer_label": "Tenant code",
"header": "What is the tenant code?",
"description": "",
"type": "text"
}
},
"conditional_route_to": {"test": "Yes"}
},
"conditional_route_to": {"test": "Yes"}
},
"person_1_age": {
"header": "",
"description": "",
"questions": {
"person_1_age": {
"check_answer_label": "Tenant's age",
"header": "What is the tenant's age?",
"hint_text": "",
"type": "numeric",
"min": 0,
"max": 120,
"step": 1
"conditional_route_to": {"test": "Yes"},
"person_1_age": {
"header": "",
"description": "",
"questions": {
"person_1_age": {
"check_answer_label": "Tenant's age",
"header": "What is the tenant's age?",
"hint_text": "",
"type": "numeric",
"min": 0,
"max": 120,
"step": 1
}
}
}
}

Loading…
Cancel
Save