grape-swagger icon indicating copy to clipboard operation
grape-swagger copied to clipboard

Array of Entities

Open supiash1 opened this issue 8 years ago • 1 comments

Hi,

Could you please tell me if there is a way to accept the array of entities in the params with content/type application json

Example screen shot 2017-07-31 at 13 10 48

code

params do optional :requests, type: API::V1::Entities::Body, desc: '...' end

But I would like to have array of requests as below

{ "requests": [ { "method": "string", "path": "string" }, { "method": "string", "path": "string" } ] }

Also tried using param_type: 'body' and is_array: true

params do optional :requests, type: API::V1::Entities::Body, documentation: { is_array: true, param_type: 'body'}, desc: '...' end It ignores the outer hash when sending the application/json screen shot 2017-07-31 at 15 41 31

supiash1 avatar Jul 31 '17 14:07 supiash1

same as #666

urkle avatar Feb 05 '19 14:02 urkle