Skip to content
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

Validation fails for arrays of non-strings when using the "multi" collection format #66

Closed
MayaOrnstein opened this issue Jan 15, 2016 · 1 comment

Comments

@MayaOrnstein
Copy link

Examples of failed validation:

When queried with value=2

<html>
 <head>
  <title>400 Bad Request</title>
 </head>
 <body>
  <h1>400 Bad Request</h1>
  The server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>
u'2' is not of type 'array'

Failed validating 'type' in schema:
    {'collectionFormat': 'multi',
     'description': 'Value',
     'in': 'query',
     'items': {'format': 'int32', 'type': 'integer'},
     'name': 'value',
     'required': False,
     'type': 'array'}

On instance:
    u'2'


 </body>
</html>

and when queried with value=2&value=1

<html>
 <head>
  <title>400 Bad Request</title>
 </head>
 <body>
  <h1>400 Bad Request</h1>
  The server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>
u'2' is not of type 'integer'

Failed validating 'type' in schema['items']:
    {'format': 'int32', 'type': 'integer'}

On instance[0]:
    u'2'

 </body>
</html>
@analogue
Copy link
Contributor

analogue commented Mar 2, 2016

Fixed in 4.1.0

@analogue analogue closed this as completed Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants