added model package

This commit is contained in:
Tony Tam 2014-05-19 23:23:23 -07:00
parent c2dd00a4ab
commit 6d8f751da4
2 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,6 @@ abstract class BasicGenerator extends CodegenConfig with PathUtil {
val authorization = opts.auth
fileMap = Option(opts.properties.getOrElse("fileMap", null))
val doc = {
try {
ResourceExtractor.fetchListing(getResourcePath(host, fileMap), authorization)
@ -204,7 +203,7 @@ abstract class BasicGenerator extends CodegenConfig with PathUtil {
m += "invokerPackage" -> invokerPackage
m += "outputDirectory" -> (destinationDir + File.separator + modelPackage.getOrElse("").replace(".", File.separator))
m += "newline" -> "\n"
m += "modelPackage" -> modelPackage
Some(m.toMap)
}
else None
@ -230,7 +229,7 @@ abstract class BasicGenerator extends CodegenConfig with PathUtil {
m += "models" -> None
m += "outputDirectory" -> (destinationDir + File.separator + apiPackage.getOrElse("").replace(".", File.separator))
m += "newline" -> "\n"
m += "modelPackage" -> modelPackage
Some(m.toMap)
}).flatten.toList
}

View File

@ -152,6 +152,7 @@ class Codegen(config: CodegenConfig) {
var data = Map[String, AnyRef](
"name" -> bundle("name"),
"modelPackage" -> bundle.getOrElse("modelPackage", None),
"package" -> bundle("package"),
"baseName" -> bundle.getOrElse("baseName", None),
"className" -> bundle("className"),