Sha256: f2ca9b3e514071fa1c853105279eaef18798f4502354766023d77dfe0ef2b42a
Contents?: true
Size: 699 Bytes
Versions: 65
Compression:
Stored size: 699 Bytes
Contents
module Seahorse module Client module Plugins # @seahorse.client.option [Boolean] :validate_params (true) # When `true`, request parameters are validated before # sending the request. class ParamValidation < Plugin option(:validate_params, true) def add_handlers(handlers, config) if config.validate_params handlers.add(Handler, step: :validate, priority: 50) end end class Handler < Client::Handler def call(context) ParamValidator.validate!(context.operation.input, context.params) @handler.call(context) end end end end end end
Version data entries
65 entries across 65 versions & 1 rubygems