openapi-python-client
openapi-python-client copied to clipboard
Auto generated use of the client with context manager is wrong
There should be a new instance every time we use the with statement. because if not the next time you use the client you'll get "Cannot reopen a client instance, once it has been closed."
Like in this example you should write in the docs:
with Client(base_url="Somthing") as client:
and not:
with client as client: