Open
Description
Hi,
For my endpoints, I wrap my response in a data
namespace (using root keyword) in a similar way as shown in the example below.
The problem is that it seems that there is not a way to document that behavior using desc.success or failure
.
Is there any way to tell grape-swagger that I want my success model under a data
root without adding that namespace in the entity itself?
Thanks,
Miguel.
resource 'cats' do
desc 'Get a list of cats.' do
success model: API::V1::Entities::Cat
end
get '/' do
# some code to get @cat
present @cat, with: API::V1::Entities::Cat, root: :data
end
end