Skip to content

Commit

Permalink
show strict option warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
ota42y committed May 30, 2021
1 parent 04fd08d commit b1d3241
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/committee/middleware/request_validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ def initialize(app, options={})
super

@strict = options[:strict]

# deprecated
@allow_extra = options[:allow_extra]
end

def handle(request)
Expand Down
4 changes: 4 additions & 0 deletions lib/committee/middleware/response_validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ class ResponseValidation < Base

def initialize(app, options = {})
super

unless options[:strict].nil?
Committee.warn_deprecated("Committee: Committee::Middleware::ResponseValidation doesn't support strict option now but we'll support this option. This change break backward compatibility so please remove strict option from ResponseValidation")
end
@validate_success_only = @schema.validator_option.validate_success_only
end

Expand Down

0 comments on commit b1d3241

Please sign in to comment.