How do I set the description of a grape entity model?
Right now, the description of the model is automatically written as "{MODEL_NAME} Model" and put in the swagger docs. How do we override that?
I would like to know this as well if anyone figures out how. I did figure out how to set the model name:
class MyNamedEntity < Grape::Entity
def self.entity_name; 'MyNewName'; end
end
A full example can be found here: https://github.com/ruby-grape/grape-entity/issues/121
This is nice b/c it lets you not have a lot of the namespace stuff in the name of your generated model types. Of course, this feels like a total hack to me rn. If anyone has a better way I'd be interested to know it too.
The entity_name method is nice indeed but I think the question was more about a desc value in the model definition. I don't think that's currently doable.