Method: Grape::DSL::Validations::ClassMethods#params

Defined in:
lib/grape/dsl/validations.rb

#params { ... } ⇒ Object

Opens a root-level ParamsScope, defining parameter coercions and validations for the endpoint.

Yields:

  • instance context of the new scope



38
39
40
# File 'lib/grape/dsl/validations.rb', line 38

def params(&block)
  Grape::Validations::ParamsScope.new(api: self, type: Hash, &block)
end