When default values have been provided with the api.mustache
constructor, backward compatibility was broken because of the public
instance variables becoming immutable vals whilst they were vars before.
We can now use the constructor arguments as default values for the internal
vars and establish backward compatibility with existing code.
Gets rid of the smelly vars inside Scala api.mustache allowing the
override of default basePath and ApiInvoker on the constructor.
Previously the code for overriding was:
val myApi = new MyApi()
myApi.basePath = "http://myapi.endpoint.com"
myApi.apiInvoker = new ApiInvoker(authScheme = "SPNEGO")
after the change everything can be simply declared in the constructor:
val myApi = new MyApi("http://myapi.endpoint.com",
new ApiInvoker(authScheme = "SPNEGO"))