lib/esplanade/response/validation.rb in esplanade-1.7.1 vs lib/esplanade/response/validation.rb in esplanade-1.8.0
- old
+ new
@@ -27,13 +27,13 @@
def more_than_one_json_schema
main_res = @doc.json_schemas.each do |json_schema|
res = JSON::Validator.fully_validate(json_schema, @raw.body.to_hash)
break res if res == []
end
- if main_res != []
- ['invalid']
- else
+ if main_res == []
[]
+ else
+ ['invalid']
end
end
def message
{