After having generated a C# REST client using the swagger-codegen java tool, I started using it in my application to send requests to the REST API. The usage of this client is very simple, all you have to do is instantiate an object and the call the apropriate method with the right parameters, no config required, plug'n'play style. Until you want to target an endpoint which is not the one from which the code was generated ... It gets a bit foggy then an somewhat lacks documentation regarding the "normal" way to do it.
After a lot of tinkering and following stack traces around the generated code in debug mode I came to the conclusion that, for the custom endpoint to be taken into account, the
baseUrl property has to be overridden in both the static default configuration and in the instantiated object's configuration.
Below is how I implemented this