def endpoint(params)
      params.each_pair do |param_name, param_value|
        case param_name
          when :summary
            endpoint_summary param_value
          when :description
            endpoint_description param_value
          when :tags
            endpoint_tags *param_value
          when :produces
            endpoint_produces *param_value
          when :path
            endpoint_path param_value
          when :parameters
            param_value.each do |param, args_param|
              endpoint_parameter param, *args_param
            end
          when :responses
            param_value.each do |code, args_response|
              endpoint_response code, *args_response
            end
          else
            raise SwaggerInvalidException.new("Invalid endpoint parameter [#{param_name}]")
        end
      end
    end
def endpoint(params)
      params.each_pair do |param_name, param_value|
        case param_name
          when :summary
            endpoint_summary param_value
          when :description
            endpoint_description param_value
          when :tags
            endpoint_tags *param_value
          when :produces
            endpoint_produces *param_value
          when :path
            endpoint_path param_value
          when :parameters
            param_value.each do |param, args_param|
              endpoint_parameter param, *args_param
            end
          when :responses
            param_value.each do |code, args_response|
              endpoint_response code, *args_response
            end
          else
            raise SwaggerInvalidException.new("Invalid endpoint parameter [#{param_name}]")
        end
      end
    end
Define fluent endpoint dispatcher
 @param params [Hash] the parameters