Skip to content

Commit c30b3cd

Browse files
author
Tim Vandecasteele
committed
Align parsing of name with other parsed values.
1 parent f5dd77c commit c30b3cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/grape-swagger.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,10 @@ def parse_params(params, path, method)
114114
description = value.is_a?(Hash) ? value[:desc] : ''
115115
required = value.is_a?(Hash) ? !!value[:required] : false
116116
paramType = path.match(":#{param}") ? 'path' : (method == 'POST') ? 'body' : 'query'
117+
name = (value.is_a?(Hash) && value[:full_name]) || param
117118
{
118119
paramType: paramType,
119-
name: value[:full_name] || param,
120+
name: name,
120121
description: description,
121122
dataType: dataType,
122123
required: required

0 commit comments

Comments
 (0)