mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 19:08:52 +00:00
added model package
This commit is contained in:
parent
c2dd00a4ab
commit
6d8f751da4
@ -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
|
||||
}
|
||||
|
@ -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"),
|
||||
|
Loading…
Reference in New Issue
Block a user