Could you please show an example of what you're describing? Thanks

On Wednesday, September 21, 2016 at 7:42:54 PM UTC-7, tony tam wrote:
>
> You don't want formData, you want an object, with attribute "sources" 
> which is type "array". 
>
> On Sep 21, 2016, at 6:50 PM, Mathieu Pheulpin <soka...@gmail.com 
> <javascript:>> wrote:
>
> I'm trying to describe the following post parameter in swagger:
>
>     {
>         "sources": [
>             {
>                 "id": 101,
>                 "parentId": 201
>             },{
>                 "id": 102,
>                 "parentId": 201
>             },{
>                 "id": 102,
>                 "parentId": 202
>             }
>         ],
>         "destinationId": 301,
>         "param1": "value 1",
>         "param2": "value 2",
>     }
>
>
> The issue is that the sources is an array of objects, that swagger does 
> not seem to support. Ideally I'd like something like that:
>
>     paths:
>         /bulk-action:
>             post:
>                 parameters:
>                     - name: sources
>                       in: formData
>                       type: array
>                       enum:
>                           $ref: '#/definitions/BulkSource'
>                     - name: destinationId
>                       in: formData
>                       type: integer
>                     - name: param1
>                       in: formData
>                       type: string
>                     - name: param2
>                       in: formData
>                       type: string
>     definitions:
>         BulkSource:
>             type: object
>             properties:
>                 id:
>                     type: integer
>                 parentId:
>                     type: integer
>
>
> Any idea on how to work around this limitation?
>
> Thanks
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to