Closed
Description
hi there I have the following grape-entites
module HQ
module Entities
class Client < Grape::Entity
expose :created_by_id, documentation: {type: Integer, desc: "Created by id"}
expose :updated_by_id, documentation: {type: Integer, desc: "Updated by id"}
expose :first_name, documentation: {type: String, desc: 'First Name.'}
expose :last_name, documentation: {type: String, desc: 'Last Name.'}
expose :zipcode, documentation: {type: String, desc: 'Zip Code.'}
expose :emails, using: HQ::Entities::Email, documentation: {type: ::Item, desc: 'Emails.'}
end
end
end
module HQ
module Entities
class Email < Grape::Entity
expose :address, documentation: {type: Integer, desc: "Email"}
end
end
end
the problem that I need that swagger generate the UI with the complex form I means client has many emails
expose :emails, using: HQ::Entities::Email, documentation: {type: Array, desc: 'Emails.'}
what type I need to use? I added array but it show me just as string field like this