forked from loafle/openapi-generator-original
fix Array[long] to List[Long]
This commit is contained in:
parent
c90083855f
commit
7056081605
@ -5,7 +5,7 @@ organization := "com.wordnik"
|
||||
|
||||
name := "swagger-codegen"
|
||||
|
||||
version := "2.0.9-WN9"
|
||||
version := "2.0.9-WN11"
|
||||
|
||||
scalaVersion := "2.10.0"
|
||||
|
||||
|
@ -500,9 +500,10 @@ class ScalaAsyncClientGenerator(cfg: SwaggerGenConfig) extends BasicGenerator {
|
||||
val declaredType = (dt.indexOf("["): @switch) match {
|
||||
case -1 => dt
|
||||
case n: Int => {
|
||||
if (dt.substring(0, n).toLowerCase == "array")
|
||||
"List" + dt.substring(n)
|
||||
else dt
|
||||
if (dt.substring(0, n).toLowerCase == "array") {
|
||||
val dtt = dt.substring(n + 1, dt.length - 1)
|
||||
s"List[${typeMapping.getOrElse(dtt, dtt)}]"
|
||||
} else dt
|
||||
}
|
||||
}
|
||||
typeMapping.getOrElse(declaredType, declaredType)
|
||||
|
Loading…
x
Reference in New Issue
Block a user