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
|
import scala.collection.mutable.HashMap
|
||||||
|
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
class {{classname}} {
|
class {{classname}}(val basePath: String = "{{basePath}}",
|
||||||
var basePath: String = "{{basePath}}"
|
apiInvoker: ApiInvoker = ApiInvoker) {
|
||||||
var apiInvoker = ApiInvoker
|
|
||||||
|
|
||||||
def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value
|
def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value
|
||||||
|
|
||||||
{{#operation}}
|
{{#operation}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user