-
Notifications
You must be signed in to change notification settings - Fork 41
Description
Hello!
We noticed that the default type that gets added to Swagger docs is string
for all fields unless otherwise specified, which is already good in most cases.
However, when we create a new entity we often find ourselves writing the following line (when we don't forget about it):
expose :id, documentation: { type: :integer }
Given that probably 99% of Rails apps out there use integer IDs for their entities, wouldn't it be great if Grape automatically set the type to Integer for id
fields? The user would then still be able to override it with the most appropriate type if needed, as now happens with all other 'string-by-default' fields.
I'm not sure if this is the right repo where this feature should be requested (maybe grape-swagger? or grape-entity?), feel free to move this issue into the more appropriate one.