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 return
end end
# directories = ["config/forms", "spec/fixtures/forms"] directories = ["config/forms", "spec/fixtures/forms"]
directories = ["config/forms"] # directories = ["config/forms"]
get_all_form_paths(directories).each do |path| get_all_form_paths(directories).each do |path|
puts 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?", "ShouldThrowError": "Shouldn't be here but what you gonna do?",
"pages": { "pages": {
"tenant_code": { "tenant_code": {
"header": "",
"description": "",
"ShouldThrowError": "Shouldn't be here but what you gonna do?", "ShouldThrowError": "Shouldn't be here but what you gonna do?",
"questions": { "questions": {
"tenant_code": { "tenant_code": {
"check_answer_label": "Tenant code", "check_answer_label": "Tenant code",
"header": "What is the tenant code?", "header": "What is the tenant code?",
"description": "",
"type": "text" "type": "text"
} }
}, },
"conditional_route_to": {"test": "Yes"} "conditional_route_to": {"test": "Yes"}
}, },
"conditional_route_to": {"test": "Yes"} "conditional_route_to": {"test": "Yes"},
}, "person_1_age": {
"person_1_age": { "header": "",
"header": "", "description": "",
"description": "", "questions": {
"questions": { "person_1_age": {
"person_1_age": { "check_answer_label": "Tenant's age",
"check_answer_label": "Tenant's age", "header": "What is the tenant's age?",
"header": "What is the tenant's age?", "hint_text": "",
"hint_text": "", "type": "numeric",
"type": "numeric", "min": 0,
"min": 0, "max": 120,
"max": 120, "step": 1
"step": 1 }
} }
} }
} }

Loading…
Cancel
Save