grape-swagger
grape-swagger copied to clipboard
Detail mixes into adjacent route definition
In desc method, I found the detail definition will be integrated into response entity description. And what's worse, it will contaminate following route definition, which leads to using above detail content. The following code can show it:
resources :students do
desc 'Create a student',
summary: 'Create a student',
detail: 'This is detail for post api.',
entity: Entities::Student
post '' do
end
desc 'List users',
summary: 'List users',
detail: 'This is detail for get api.',
entity: Entities::Student
get '' do
end
end
And the get api render the doc is below, noticing the entity description:
