Sha256: cf232c7d6b63e54e49b67666b3d98f677acce000fdf1c14ba4ecc54bbc16b0be

Contents?: true

Size: 385 Bytes

Versions: 4

Compression:

Stored size: 385 Bytes

Contents

# https://github.com/ota42y/openapi_parser/issues/75
module OpenAPIParser
  class PathItemFinder
    private

    def find_path_and_params(http_method, request_path)
      return [request_path, {}] if matches_directly?(request_path, http_method)

      matching = matching_paths_with_params(request_path, http_method)

      matching.min_by { |match| match[1].size }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fakeit-0.6.2 lib/fakeit/core_extensions/path_item_finder.rb
fakeit-0.6.1 lib/fakeit/core_extensions/path_item_finder.rb
fakeit-0.6.0 lib/fakeit/core_extensions/path_item_finder.rb
fakeit-0.5.3 lib/fakeit/core_extensions/path_item_finder.rb