Sha256: 256adbf1d345fe66d6400965da409fc1ecd8990124a3cf380531c5fd3888b218

Contents?: true

Size: 485 Bytes

Versions: 28

Compression:

Stored size: 485 Bytes

Contents

module Rack::App::SingletonMethods::ParamsValidator
  def validate_params(&block)
    descriptor = Rack::App::Middlewares::Params::Definition.new(&block).to_descriptor
    route_registration_properties[:params]= descriptor
    next_endpoint_middlewares do |builder|
      builder.use(Rack::App::Middlewares::Params::Setter)
      builder.use(Rack::App::Middlewares::Params::Validator, descriptor)
      builder.use(Rack::App::Middlewares::Params::Parser, descriptor)
    end
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
rack-app-11.0.2 lib/rack/app/singleton_methods/params_validator.rb
rack-app-11.0.1 lib/rack/app/singleton_methods/params_validator.rb
rack-app-11.0.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-10.0.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-9.0.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-8.1.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-8.0.1 lib/rack/app/singleton_methods/params_validator.rb
rack-app-8.0.0 lib/rack/app/singleton_methods/params_validator.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/rack-app-7.7.0/lib/rack/app/singleton_methods/params_validator.rb
rack-app-7.7.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-7.6.5 lib/rack/app/singleton_methods/params_validator.rb
rack-app-7.6.4 lib/rack/app/singleton_methods/params_validator.rb
rack-app-7.6.3 lib/rack/app/singleton_methods/params_validator.rb
rack-app-7.6.2 lib/rack/app/singleton_methods/params_validator.rb
rack-app-7.6.1 lib/rack/app/singleton_methods/params_validator.rb
rack-app-7.6.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-7.5.2 lib/rack/app/singleton_methods/params_validator.rb
rack-app-7.5.1 lib/rack/app/singleton_methods/params_validator.rb
rack-app-7.5.0 lib/rack/app/singleton_methods/params_validator.rb
rack-app-7.4.0 lib/rack/app/singleton_methods/params_validator.rb