Description
Right now, if an endpoint doesn't declare anything beyond the default desc
value, the summary field will be empty.
I.e. if this is done:
desc 'A short endpoint description'
get '/endpoint' do
end
The swagger documentation for this endpoint will not contain the summary field. This is a problem because if you then render using something like Swagger UI the resulting rendering will not contain any short description, the line will have just the url, like this:
This seems to me like undesirable behaviour since the endpoint would look more informative if it used the desc
value as summary.
This behaviour is right now encoded in specs, although indirectly. There are many specs but one of the simpler cases is in the mounted_target_class_spec which declares an endpoint with just desc but then doesn't expect any summary in the result.
I have a hunch that it didn't used to be like this since the code tries to read the desc attribute of route options and use it as summary but current version of grape never sets that attribute anywhere in the code.
Is this really desirable behaviour or a bug?