forked from loafle/openapi-generator-original
Merge pull request #426 from lucamilanesio/scala-mustache-easy-override
Scala api.mustache: allow easy basePath and ApiInvoker override
This commit is contained in:
commit
d821a897b3
@ -11,10 +11,9 @@ import java.util.Date
|
||||
import scala.collection.mutable.HashMap
|
||||
|
||||
{{#operations}}
|
||||
class {{classname}} {
|
||||
var basePath: String = "{{basePath}}"
|
||||
var apiInvoker = ApiInvoker
|
||||
|
||||
class {{classname}}(val basePath: String = "{{basePath}}",
|
||||
apiInvoker: ApiInvoker = ApiInvoker) {
|
||||
|
||||
def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value
|
||||
|
||||
{{#operation}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user