Skip to content

Commit 2fba967

Browse files
committed
Merge pull request #172 from giovannibotta/master
Minor change to map used when generating supporting files
2 parents d98aeac + dccf8ed commit 2fba967

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main/scala/com/wordnik/swagger/codegen/Codegen.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ class Codegen(config: CodegenConfig) {
8181
lb
8282
})
8383
opList += apiToMap(apiPath, operation)
84-
84+
8585
CoreUtils.extractModelNames(operation).foreach(i => allImports += i)
8686
}
8787
})
8888
}
89-
89+
9090
case None =>
9191
}
9292

@@ -223,14 +223,14 @@ class Codegen(config: CodegenConfig) {
223223
var paramList = new ListBuffer[HashMap[String, AnyRef]]
224224
var errorList = new ListBuffer[HashMap[String, AnyRef]]
225225
var bodyParamRequired: Option[String] = Some("true")
226-
226+
227227
if (operation.responseMessages != null) {
228-
operation.responseMessages.foreach(param => {
228+
operation.responseMessages.foreach(param => {
229229
val params = new HashMap[String, AnyRef]
230230
params += "code" -> param.code.toString()
231231
params += "reason" -> param.message
232232
params += "hasMore" -> "true"
233-
errorList += params
233+
errorList += params
234234
})
235235
}
236236

@@ -509,7 +509,7 @@ class Codegen(config: CodegenConfig) {
509509
"defaultValue" -> config.toDeclaration(propertyDocSchema)._2,
510510
"description" -> propertyDocSchema.description,
511511
"notes" -> propertyDocSchema.description,
512-
"allowableValues" -> rawAllowableValuesToString(propertyDocSchema.allowableValues),
512+
"allowableValues" -> rawAllowableValuesToString(propertyDocSchema.allowableValues),
513513
(if(propertyDocSchema.required) "required" else "isNotRequired") -> "true",
514514
"getter" -> config.toGetter(prop._1, config.toDeclaration(propertyDocSchema)._1),
515515
"setter" -> config.toSetter(prop._1, config.toDeclaration(propertyDocSchema)._1),
@@ -567,7 +567,7 @@ class Codegen(config: CodegenConfig) {
567567
"className" -> config.toApiName(a._1._2),
568568
"basePath" -> a._1._1,
569569
"operations" -> {
570-
(for (t <- a._2) yield { Map("operation" -> t._2, "path" -> t._1) }).toList
570+
(for (t <- a._2) yield { Map("operation" -> apiToMap(t._1, t._2), "path" -> t._1) }).toList
571571
})
572572
})
573573

0 commit comments

Comments
 (0)