Merge pull request #427 from lucamilanesio/scala-mustache-backward-compatibility

Scala api.mustache: make new constructor backward compatible
This commit is contained in:
Tony Tam
2015-02-14 17:34:23 -08:00

View File

@@ -11,8 +11,10 @@ import java.util.Date
import scala.collection.mutable.HashMap
{{#operations}}
class {{classname}}(val basePath: String = "{{basePath}}",
apiInvoker: ApiInvoker = ApiInvoker) {
class {{classname}}(val defBasePath: String = "{{basePath}}",
defApiInvoker: ApiInvoker = ApiInvoker) {
var basePath = defBasePath
var apiInvoker = defApiInvoker
def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value