Closed
Description
Because of the following code in grape-swagger.rb, around line 126:
paramType = path.match(":#{param}") ? 'path' : (method == 'POST') ? 'body' : 'query'
you cannot have a nice swagger UI for a PUT
method with a text box for body. Should the above be amended to be something like this:
paramType = path.match(":#{param}") ?
'path' : (method == 'POST' || method == 'PUT') ? 'body' : 'query'
or should we introduce a DSL way to specify param type of 'body', something along the lines of
params do
optional :body, body: true, desc: 'This parameter is the body of the request'
end
I am willing to submit a pull request once an acceptable approach is determined..