When I create an OpenAPI client like this:
api = OpenAPI(spec, use_session=True, session_factory=MySession)
then any hooks that MySession might use are not called.
The bug is caused because paths.py calls .prepare() on the request so the session never comes into play:
|
result = session.send(self._request.prepare(), verify=verify) |
The correct approach is to call session.prepare_request(self._request).
When I create an OpenAPI client like this:
then any hooks that
MySessionmight use are not called.The bug is caused because
paths.pycalls.prepare()on the request so the session never comes into play:openapi3/openapi3/paths.py
Line 344 in e6cbc94
The correct approach is to call
session.prepare_request(self._request).