Class: Openapi3Parser::Validators::Url
- Inherits:
-
Object
- Object
- Openapi3Parser::Validators::Url
- Defined in:
- lib/openapi3_parser/validators/url.rb
Class Method Summary collapse
Class Method Details
.call(input) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/openapi3_parser/validators/url.rb', line 6 def self.call(input) = %("#{input}" is not a valid URL) uri = URI.parse(input) if !uri.relative? && !uri.is_a?(URI::HTTP) && !uri.is_a?(URI::HTTPS) rescue URI::InvalidURIError end |