How can I return polymorphic data with Grape Enttity and Swagger?

How can I return polymorphic data with Grape Enttity and Swagger?

I have a polymorphic tag and want to search ambigous items by this tag.

I have a polymorphic tag and want to search ambigous items by this tag.

How can I return this whith Grape Entity?

class Tag < ActiveRecord::Base
  belongs_to :taggable, polymorphic: true
end

class Article < ActiveRecord::Base has_many :tags, as: :taggable end

class Post < ActiveRecord::Base has_many :tags, as: :taggable end

module Api module Entities class Tag < Grape::Entity expose :lable expose :taggable # HELP: , using Api::Entities::<polymorphic> end end

I need to define the Entity of taggable to expose a Swagger aka OpenAPI interface.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Ruby on Rails vs PHP

Understanding the pros and cons of Ruby on Rails versus PHP is important when deciding how to create your business-critical applications.