Skip to content

Array of Entities #628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
supiash1 opened this issue Jul 31, 2017 · 1 comment
Open

Array of Entities #628

supiash1 opened this issue Jul 31, 2017 · 1 comment
Labels

Comments

@supiash1
Copy link

supiash1 commented Jul 31, 2017

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

@dblock dblock added the question label Aug 6, 2017
@urkle
Copy link
Contributor

urkle commented Feb 5, 2019

same as #666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants