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
For swaggerpy version 0.7.6 when we call and endpoint with a body parameter the header {'content-type': 'application/json'} is added for us. However, it is persisted which causes endpoints that don't need that header to fail.
i.e. -
client.get_client(...).endpoints.endpoint(body={'some_data': 'some_data'})
So this issue is that here we are fetching the _request_options reference and mutatingit later. The dict provided by user should not get mutated at any cost. So, i think the fix should be:
_request_options=kwargs.pop('_request_options', {}).copy() or {}
which will needed to be patched to both swaggerpy and bravado.
For swaggerpy version 0.7.6 when we call and endpoint with a body parameter the header {'content-type': 'application/json'} is added for us. However, it is persisted which causes endpoints that don't need that header to fail.
i.e. -
client.get_client(...).endpoints.endpoint(body={'some_data': 'some_data'})
workaround for now is
client.get_client(...).endpoints.endpoint(_request_options={'headers': {'content-type': 'application/json'}}, body={'some_data': 'some_data'})
The text was updated successfully, but these errors were encountered: