forked from loafle/openapi-generator-original
Merge pull request #427 from lucamilanesio/scala-mustache-backward-compatibility
Scala api.mustache: make new constructor backward compatible
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user