grape-swagger icon indicating copy to clipboard operation
grape-swagger copied to clipboard

Is the default value of format option really :json?

Open viranch opened this issue 11 years ago • 3 comments

According to https://github.com/tim-vandecasteele/grape-swagger/blob/master/lib/grape-swagger.rb#L336 it looks like the default value of the option format is not :json but nil.

It'd be great if this could be clarified.

viranch avatar Dec 29 '14 17:12 viranch

+1 for the :json :) kinda related https://github.com/tim-vandecasteele/grape-swagger/issues/197

dm1try avatar Feb 15 '15 03:02 dm1try

The documentation says :json is the default, but the code, as I pointed out, doesn't indicate so. I think this should be clarified in the documentation as the first step?

viranch avatar Feb 16 '15 08:02 viranch

:+1: on clarifying the documentation, however I think what it was trying to say is that the default format is JSON if you don't specify, not that the default parameter to format is :json. Either way I'll take a PR that makes things clear

dblock avatar Feb 20 '15 15:02 dblock