Skip to content

Commit 52b5133

Browse files
Merge pull request #29 from jhecking/master
Change POST parameters to type 'form'
2 parents 676efe2 + 197972b commit 52b5133

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/grape-swagger.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def parse_params(params, path, method)
122122
dataType = value.is_a?(Hash) ? value[:type]||'String' : 'String'
123123
description = value.is_a?(Hash) ? value[:desc] : ''
124124
required = value.is_a?(Hash) ? !!value[:required] : false
125-
paramType = path.match(":#{param}") ? 'path' : (method == 'POST') ? 'body' : 'query'
125+
paramType = path.match(":#{param}") ? 'path' : (method == 'POST') ? 'form' : 'query'
126126
name = (value.is_a?(Hash) && value[:full_name]) || param
127127
{
128128
paramType: paramType,

0 commit comments

Comments
 (0)