diff --git a/lib/tasks/form_definition.rake b/lib/tasks/form_definition.rake index d3ed40a2a..8155f76e1 100644 --- a/lib/tasks/form_definition.rake +++ b/lib/tasks/form_definition.rake @@ -12,7 +12,7 @@ def get_all_form_paths(directories) end namespace :form_definition do - desc "Validate JSON against Generic Form Schema" + desc "Validate all JSON against Generic Form Schema" task validate_all: :environment do directories = ["config/forms", "spec/fixtures/forms"] @@ -24,9 +24,9 @@ namespace :form_definition do end end - task :validate, %i[path] => :environment do |_task, args| - puts args + desc "Validate Single JSON against Generic Form Schema" + task :validate, %i[path] => :environment do |_task, args| path = Rails.root.join("config/forms/schema/generic.json") file = File.open(path) schema = JSON.parse(file.read) @@ -34,8 +34,6 @@ namespace :form_definition do puts path - binding.pry - if JSON::Validator.validate(meta_schema, schema) puts "Schema Definition is Valid" else