Sha256: 2ebf4b601e49bfdadbab16b6d768c6715cdf5c20be6b22bcde177a931dad0bec
Contents?: true
Size: 398 Bytes
Versions: 10
Compression:
Stored size: 398 Bytes
Contents
# frozen_string_literal: true module Openapi3Parser module Validators class Url def self.call(input) message = %("#{input}" is not a valid URL) uri = URI.parse(input) message if !uri.relative? && !uri.is_a?(URI::HTTP) && !uri.is_a?(URI::HTTPS) rescue URI::InvalidURIError message end end end end
Version data entries
10 entries across 10 versions & 1 rubygems