def input_format(&block)
      case
      when block && !@input_format_block
        @input_format_block = block
      when !block && @input_format_block
        return @input_format ||= Apipie::Params::Description.define(&@input_format_block)
      when block && @input_format_block
        raise "The input_format has already been defined in #{self.class}"
      when !block && !@input_format_block
        if superclass.respond_to? :input_format
          superclass.input_format
        else
          raise "The input_format has not been defined yet in #{self.class}"
        end
      end
    end
def input_format(&block)
      case
      when block && !@input_format_block
        @input_format_block = block
      when !block && @input_format_block
        return @input_format ||= Apipie::Params::Description.define(&@input_format_block)
      when block && @input_format_block
        raise "The input_format has already been defined in #{self.class}"
      when !block && !@input_format_block
        if superclass.respond_to? :input_format
          superclass.input_format
        else
          raise "The input_format has not been defined yet in #{self.class}"
        end
      end
    end
we don't evaluate tbe block immediatelly, but postpone it till all the
 action classes are loaded, because we can use them to reference output format