We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 161c6e3 commit aa6a972Copy full SHA for aa6a972
lib/grape-swagger.rb
@@ -32,7 +32,11 @@ def add_swagger_documentation(options = {})
32
options = { target_class: self }.merge(options)
33
@target_class = options[:target_class]
34
35
- use options[:endpoint_auth_wrapper] if !options[:endpoint_auth_wrapper].nil? && options[:endpoint_auth_wrapper].method_defined?(:before)
+ if !options[:endpoint_auth_wrapper].nil? &&
36
+ options[:endpoint_auth_wrapper].method_defined?(:before) &&
37
+ !middleware.flatten.include?(options[:endpoint_auth_wrapper])
38
+ use options[:endpoint_auth_wrapper]
39
+ end
40
41
documentation_class.setup(options)
42
mount(documentation_class)
0 commit comments