it appears grape-swagger doesn't support grapes use of the route_param block
This code works fine.
desc 'Delete a question'
params do
requires :id, desc: 'ID of the question'
end
delete ':id' do
Question.find(params[:id]).delete
{ success: true }
end
This code below throws an error.
route_param :id do
delete do
Question.find(params[:id]).delete
{ success: true }
end
end
I'm logging this as an issue because the way we use Napa at Belly and the official grape examples result in this error. And it took me several hours to figure out what the cause was. Hopefully this helps someone else.
it appears grape-swagger doesn't support grapes use of the route_param block
This code works fine.
This code below throws an error.
I'm logging this as an issue because the way we use Napa at Belly and the official grape examples result in this error. And it took me several hours to figure out what the cause was. Hopefully this helps someone else.