You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python main.py.----------------------------------------------------------------------Ran 1 test in 0.017sOK
Actual behaviour
$ python main.pyERROR:connexion.decorators.validation:http://localhost/ validation error: None is not of type 'object'Failed validating 'type' in schema: {'type': 'object'}On instance: NoneF======================================================================FAIL: test (__main__.Test)----------------------------------------------------------------------Traceback (most recent call last): File "/home/gasmith/cx/main.py", line 21, in test self.assertEqual(resp.status_code, 403)AssertionError: 500 != 403----------------------------------------------------------------------Ran 1 test in 0.023sFAILED (failures=1)
Bisection
bisect.sh:
export PYTHONPATH=$(pwd)
git checkout master
git bisect start
git bisect bad
git bisect good 1.5.3
git bisect run python main.py
Bisection output:
$ ./bisect.sh
...
9bef8c46a699719f2616560fcdde7add2299d5af is the first bad commit
commit 9bef8c46a699719f2616560fcdde7add2299d5af
Author: Diogo Dutra <diogodutradamata@gmail.com>
Date: Tue Dec 11 05:28:58 2018 -0200
Removed duplicated calls of get_response method of the Api classes (#809)
On Operation decorators lifecycle the api.get_response method were always called twice.
Because the response validation, we need to cast the response to the ConnexionResponse type.
But the response casting could be made on the response validation decorator, not always. So, changes were made to cast the response correctly.
The BeginOfRequestLifecycleDecorator class was removed because it only do the second call of api.get_response method. This second call only occurs if the response validation is needed.
For a more logical naming, the EndOfRequestLifecycleDecorator class was renamed to RequestResponseDecorator.
Fixes #664
:040000 040000 e68b6742cb39d7c4bb0a0349ef8cf63e16303ef3 0b0e738c93803db751213a1b946347665998dd79 M connexion
bisect run success
Additional info:
The same behavior is observed for both Python 2.7 and Python 3.5.
The text was updated successfully, but these errors were encountered:
This patch addresses the issue using the same approach as the aiohttp
implementation, ensuring that the response body is properly encoded as
part of get_connexion_response().
Fixesspec-first#964
This patch addresses the issue using the same approach as the aiohttp
implementation, ensuring that the response body is properly encoded as
part of get_connexion_response().
Fixesspec-first#964
Description
Connexion does not validate
connexion.problem
responses properly. This is a regression introduced by 9bef8c4, and first appearing in version 2.1.0.Steps to reproduce
spec.yml
:main.py
:Expected behaviour
Actual behaviour
Bisection
bisect.sh
:Bisection output:
Additional info:
The same behavior is observed for both Python 2.7 and Python 3.5.
The text was updated successfully, but these errors were encountered: