Skip to content

Array of Entities #628

Open
Open
@supiash1

Description

@supiash1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions