The spec lists several possible formats in the collectionFormat field for an array parameter.
My suggestion is to include json too because
- we use json everywhere, no need to introduce a new serialization format here
- json serializer is there already on both the client and server side
- it's as simple as csv (2 more bytes)
The swagger fragment would look like this:
- name: id__inin: queryrequired: falsetype: arraycollectionFormat: jsonitems:type: integerformat: int64
The URL would look like this:
https://example.com/api/users/?id__in=[1,2,3]
The spec lists several possible formats in the
collectionFormatfield for an array parameter.My suggestion is to include
jsontoo becauseThe swagger fragment would look like this:
The URL would look like this:
https://example.com/api/users/?id__in=[1,2,3]