def responds_with(**args, &block)
      builder = FilterBuilder.new

      builder.instance_eval(&block)

      response_filters.concat(builder.response_filters)
      response_formatters.concat(builder.response_formatters)

      if args[:unnested_hash]
        response_formatters << lambda do |_, response|
          if response.is_a?(Hash) && response.keys.length == 1
            response.values.first
          else
            response
          end
        end
      end
    end
def responds_with(**args, &block)
      builder = FilterBuilder.new

      builder.instance_eval(&block)

      response_filters.concat(builder.response_filters)
      response_formatters.concat(builder.response_formatters)

      if args[:unnested_hash]
        response_formatters << lambda do |_, response|
          if response.is_a?(Hash) && response.keys.length == 1
            response.values.first
          else
            response
          end
        end
      end
    end
Defines the expected content and format of the response for this API action.

 @example
   responds_with do
     string :user_id
   end

 See the {Apidiesel::Dsl::FilterBuilder FilterBuilder} instance methods
 for more information on what to use within `responds_with`.

 @macro [attach] responds_with
   @yield [Apidiesel::Dsl::FilterBuilder]