def resolve_parameter_details(parameters)
      parameters.map do |parameter|
        # URI decode parameters and strip the leading '{(' and trailing ')}'.
        parameter = URI.unescape(parameter[2..-3])

        # Split the path into components and discard the leading '#' that
        # represents the root of the schema.
        path = parameter.split('/')[1..-1]
        info = lookup_parameter(path, @schema)
        # The reference can be one of several values.
        resource_name = path[1].gsub('-', '_')
        if info.has_key?('anyOf')
          ParameterChoice.new(resource_name,
                              unpack_multiple_parameters(info['anyOf']))
        elsif info.has_key?('oneOf')
          ParameterChoice.new(resource_name,
                              unpack_multiple_parameters(info['oneOf']))
        else
          name = path[-1]
          Parameter.new(resource_name, name, info['description'])
        end
      end
    end
def resolve_parameter_details(parameters)
      parameters.map do |parameter|
        # URI decode parameters and strip the leading '{(' and trailing ')}'.
        parameter = URI.unescape(parameter[2..-3])

        # Split the path into components and discard the leading '#' that
        # represents the root of the schema.
        path = parameter.split('/')[1..-1]
        info = lookup_parameter(path, @schema)
        # The reference can be one of several values.
        resource_name = path[1].gsub('-', '_')
        if info.has_key?('anyOf')
          ParameterChoice.new(resource_name,
                              unpack_multiple_parameters(info['anyOf']))
        elsif info.has_key?('oneOf')
          ParameterChoice.new(resource_name,
                              unpack_multiple_parameters(info['oneOf']))
        else
          name = path[-1]
          Parameter.new(resource_name, name, info['description'])
        end
      end
    end
Get the parameters this link expects.

 @param parameters [Array] The names of the parameter definitions to
   convert to parameter names.
 @return [Array<Parameter|ParameterChoice>] A list of parameter instances
   that represent parameters to be injected into the link URL.