Skip to content

Commit

Permalink
Return true instead of nil when validation passes
Browse files Browse the repository at this point in the history
As mentioned in #101 it makes more sense to return true from this method
when validation passes instead of nil.
  • Loading branch information
Tristan O'Neil authored and tristanoneil committed Mar 30, 2022
1 parent 69c8c9a commit e667d54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/openapi_parser/schemas/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def validate(response_body, response_validate_options)
raise ::OpenAPIParser::NotExistContentTypeDefinition, object_reference
end

return nil
return true
end

options = ::OpenAPIParser::SchemaValidator::Options.new # response validator not support any options
Expand Down

0 comments on commit e667d54

Please sign in to comment.