fix csharp model name issue

This commit is contained in:
William Cheng
2015-04-21 22:42:13 +08:00
parent 7f4916f333
commit 2c0e8f6079
9 changed files with 42 additions and 32 deletions

View File

@@ -50,8 +50,17 @@ public class CSharpClientCodegen extends DefaultCodegen implements CodegenConfig
languageSpecificPrimitives = new HashSet<String>(
Arrays.asList(
"string?",
"bool?",
"double?",
"int?",
"long?",
"float?",
"byte[]",
"List",
"Dictionary",
"DateTime",
"String",
"boolean",
"Boolean",
"Double",
"Integer",
@@ -63,6 +72,7 @@ public class CSharpClientCodegen extends DefaultCodegen implements CodegenConfig
instantiationTypes.put("map", "Dictionary");
typeMapping = new HashMap<String, String>();
typeMapping.put("string", "string?");
typeMapping.put("boolean", "bool?");
typeMapping.put("integer", "int?");
typeMapping.put("float", "float?");
@@ -161,7 +171,7 @@ public class CSharpClientCodegen extends DefaultCodegen implements CodegenConfig
}
else
type = swaggerType;
return type;
return toModelName(type);
}
@Override