ruby-grape / grape-entity

An API focused facade that sits on top of an object model.
MIT License
721 stars 153 forks source link

Documentation for field with multiple types #321

Closed wedgex closed 5 years ago

wedgex commented 5 years ago

Is there a way to expose a field and document it's type as being one of several options?

For example if I had a subscriber field that could either be a Person or Organization I'd like to be able to express something like

expose :subscriber, documentation: { types: [PersonEntity, OrganizationEntity] }