mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 10:58:55 +00:00
Merge pull request #207 from emmekappa/master
Fixing extensions and namespaces for csharp common files.
This commit is contained in:
commit
02631e674a
@ -60,7 +60,9 @@ class BasicCSharpGenerator extends BasicGenerator {
|
||||
override def templateDir = "csharp"
|
||||
|
||||
// where to write generated code
|
||||
override def destinationDir = "generated-code/csharp/src/main/csharp"
|
||||
override def destinationDir = "generated-code/csharp/src"
|
||||
|
||||
override def invokerPackage: Option[String] = Some("Swagger.Client.Common")
|
||||
|
||||
// template used for models
|
||||
modelTemplateFiles += "model.mustache" -> ".cs"
|
||||
@ -79,10 +81,10 @@ class BasicCSharpGenerator extends BasicGenerator {
|
||||
override def importMapping = Map()
|
||||
|
||||
// package for models
|
||||
override def modelPackage: Option[String] = Some("Com.Wordnik.Client.Model")
|
||||
override def modelPackage: Option[String] = Some("Swagger.Client.Model")
|
||||
|
||||
// package for api classes
|
||||
override def apiPackage: Option[String] = Some("Com.Wordnik.Client.Api")
|
||||
override def apiPackage: Option[String] = Some("Swagger.Client.Api")
|
||||
|
||||
// file suffix
|
||||
override def fileSuffix = ".cs"
|
||||
@ -198,8 +200,8 @@ class BasicCSharpGenerator extends BasicGenerator {
|
||||
// supporting classes
|
||||
override def supportingFiles =
|
||||
List(
|
||||
("apiInvoker.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiInvoker.java"),
|
||||
("apiException.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiException.java"),
|
||||
("apiInvoker.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiInvoker.cs"),
|
||||
("apiException.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiException.cs"),
|
||||
("Newtonsoft.Json.dll", "generated-code/csharp/bin", "Newtonsoft.Json.dll"),
|
||||
("compile.mustache", "generated-code/csharp", "compile.bat"))
|
||||
}
|
Loading…
Reference in New Issue
Block a user