Skip to content

Commit

Permalink
Support the overwite version for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
r7kamura committed May 13, 2024
1 parent 0b04d94 commit b165473
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/committee/schema_validator/option.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ def initialize(options, schema, schema_type)
@coerce_recursive = options.fetch(:coerce_recursive, true)
@optimistic_json = options.fetch(:optimistic_json, false)
@parse_response_by_content_type = options.fetch(:parse_response_by_content_type, true)
@parameter_overwrite_by_rails_rule = options.fetch(:parameter_overwrite_by_rails_rule, true)

@parameter_overwrite_by_rails_rule =
if options.key?(:parameter_overwite_by_rails_rule)
Committee.warn_deprecated_until_6(true, "The option `parameter_overwite_by_rails_rule` is deprecated. Use `parameter_overwrite_by_rails_rule` instead.")
options[:parameter_overwite_by_rails_rule]
else
options.fetch(:parameter_overwrite_by_rails_rule, true)
end

# Boolean options and have a different value by default
@allow_get_body = options.fetch(:allow_get_body, schema.driver.default_allow_get_body)
Expand Down

0 comments on commit b165473

Please sign in to comment.