From 10a3b657666c4b956cfe5c5a016b5039054f3b8d Mon Sep 17 00:00:00 2001 From: Andrew Schuster Date: Fri, 10 Jun 2016 14:27:32 -0400 Subject: [PATCH] Fix logic for mapping Hash and Array objects to refs --- lib/grape-swagger/endpoint.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/grape-swagger/endpoint.rb b/lib/grape-swagger/endpoint.rb index 497f88a9..02caa3cc 100644 --- a/lib/grape-swagger/endpoint.rb +++ b/lib/grape-swagger/endpoint.rb @@ -231,7 +231,7 @@ def parse_request_params(required) else key = param.first end - memo[key] = param.last unless param.last[:type] == 'Hash' || param.last[:type] == 'Array' && !param.last.key?(:documentation) + memo[key] = param.last unless (param.last[:type] == 'Hash' || param.last[:type] == 'Array') && !param.last.key?(:documentation) end end