Is your feature request related to a problem? Please describe.
My use case is one OpenAPI spec with multiple parties. Currently, the generated OpenAPI client is a global instance inside client.py. In my case, the global instance is configured a base URL of party A. Because the client is global, it is not unable to configure the base URL to party B, or requests to A would be sent to B, race condition happens.
More specifically, I am working on OCPI. Its an industry protocol for EV roaming charging. There are multiple charging companies with the same OCPI standardized API endpoints and the same request parameters interactive each other.
Describe the solution you'd like
OpenAPI client generator factory mode. The client.py have a client factory. We initialize a client for a specific party from the factory class (or function).
Is your feature request related to a problem? Please describe.
My use case is one OpenAPI spec with multiple parties. Currently, the generated OpenAPI client is a global instance inside client.py. In my case, the global instance is configured a base URL of party A. Because the client is global, it is not unable to configure the base URL to party B, or requests to A would be sent to B, race condition happens.
More specifically, I am working on OCPI. Its an industry protocol for EV roaming charging. There are multiple charging companies with the same OCPI standardized API endpoints and the same request parameters interactive each other.
Describe the solution you'd like
OpenAPI client generator factory mode. The client.py have a client factory. We initialize a client for a specific party from the factory class (or function).