Incomplete entity name for swagger documentation
mrexox opened this issue · comments
I've met a problem with swagger documentation because of this method, that parses model name and leaves the last exact entity name (if it is nested). It might be a problem for the case I am going to describe.
grape-swagger/lib/grape-swagger/endpoint.rb
Lines 335 to 337 in 7237ef3
For my project I use this versioning approach:
module API
module SomeModel
class V1 < Grape::Entity
...
end
class V2 < Grape::Entity
...
end
end
end
So, for that case parsing of a model to model name returns just "V1"
or "V2"
. That is why all endpoints that end with V1
will represent the last parsed endpoint.
Could the parsed model name be widened to all the described entity name?
this is always an ongoing discussion 😉 …
but your arguments are the most reasonable for the moment to change to full name
a PR is welcome 😄