[Swift5] Generate non-static API classes
Is your feature request related to a problem? Please describe.
The swift5 generator generates API classes with class method, which are static, and use static configuration (the generated ClientAPI class). This makes testing, mocking and using several configurations very hard and cumbersome. This behavior does not match other generators (such as C# and typescript) that generate classes that can be instantiated and receive a configuration upon instantiation
Describe the solution you'd like
Given this is already the default behavior, i think that adding a flag that allows to generate non-static APIs will be extremely helpful
Describe alternatives you've considered
I've looked for a flag that will allow this and didn't find any (i apologize if i missed it). ATM, i'm wrapping the generated api class with a class of my own, but like i wrote above, this makes the code prone to errors, leaks and makes it cumbersome and harder to test
Additional context
Bumping up, looking to build integration tests and hard to make them robust enough if testing against multiple environments