lib/openapi3_parser/validators/reference.rb in openapi3_parser-0.5.2 vs lib/openapi3_parser/validators/reference.rb in openapi3_parser-0.6.0

- old
+ new

@@ -18,23 +18,23 @@ private attr_reader :given_reference def build_errors - return "expected a string" unless given_reference.is_a?(String) + return "Expected a string" unless given_reference.is_a?(String) begin uri = URI.parse(given_reference) rescue URI::Error - return "could not parse as a URI" + return "Could not parse as a URI" end check_fragment(uri) || [] end def check_fragment(uri) return if uri.fragment.nil? || uri.fragment.empty? first_char = uri.fragment[0] - "invalid JSON pointer, expected a root slash" if first_char != "/" + "Invalid JSON pointer, expected a root slash" if first_char != "/" end end end end