Better handling response data
playpauseandstop opened this issue · comments
Igor Davydenko commented
When response is a tuple
, but not a list
, next exception raised,
File "/Users/playpauseandstop/Projects/project/.venv/lib/python3.7/site-packages/rororo/schemas/schema.py", line 114, in make_response
self._validate(data, response_schema)
File "/Users/playpauseandstop/Projects/project/.venv/lib/python3.7/site-packages/rororo/schemas/schema.py", line 190, in _validate
return self.validate_func(schema, self._pure_data(data))
File "/Users/playpauseandstop/Projects/project/.venv/lib/python3.7/site-packages/rororo/schemas/schema.py", line 178, in _pure_data
return dict(data)
ValueError: dictionary update sequence element #0 has length 3; 2 is required
This is not fully right as tuple
can be validated by jsonschema
similarly to list
.
Igor Davydenko commented
Closed as it not related to new rororo version.