@@ -46,6 +46,7 @@ public CSharpClientCodegen() {
46
46
supportingFiles .add (new SupportingFile ("apiException.mustache" ,
47
47
(sourceFolder + File .separator + invokerPackage ).replace ("." , java .io .File .separator ), "ApiException.cs" ));
48
48
supportingFiles .add (new SupportingFile ("Newtonsoft.Json.dll" , "bin" , "Newtonsoft.Json.dll" ));
49
+ supportingFiles .add (new SupportingFile ("RestSharp.dll" , "bin" , "RestSharp.dll" ));
49
50
supportingFiles .add (new SupportingFile ("compile.mustache" , "" , "compile.bat" ));
50
51
51
52
languageSpecificPrimitives = new HashSet <String >(
@@ -59,7 +60,7 @@ public CSharpClientCodegen() {
59
60
"byte[]" ,
60
61
"List" ,
61
62
"Dictionary" ,
62
- "DateTime" ,
63
+ "DateTime? " ,
63
64
"String" ,
64
65
"Boolean" ,
65
66
"Double" ,
@@ -79,9 +80,11 @@ public CSharpClientCodegen() {
79
80
typeMapping .put ("long" , "long?" );
80
81
typeMapping .put ("double" , "double?" );
81
82
typeMapping .put ("number" , "double?" );
82
- typeMapping .put ("Date" , "DateTime" );
83
+ typeMapping .put ("datetime" , "DateTime?" );
84
+ typeMapping .put ("date" , "DateTime?" );
83
85
typeMapping .put ("file" , "string" ); // path to file
84
86
typeMapping .put ("array" , "List" );
87
+ typeMapping .put ("list" , "List" );
85
88
typeMapping .put ("map" , "Dictionary" );
86
89
typeMapping .put ("object" , "Object" );
87
90
@@ -94,11 +97,11 @@ public String escapeReservedWord(String name) {
94
97
95
98
@ Override
96
99
public String apiFileFolder () {
97
- return outputFolder + "/" + sourceFolder + "/" + apiPackage ().replace ('.' , File .separatorChar );
100
+ return ( outputFolder + "/" + sourceFolder + "/" + apiPackage (). replace ( '.' , '/' ) ).replace ('.' , File .separatorChar );
98
101
}
99
102
100
103
public String modelFileFolder () {
101
- return outputFolder + "/" + sourceFolder + "/" + modelPackage ().replace ('.' , File .separatorChar );
104
+ return ( outputFolder + "/" + sourceFolder + "/" + modelPackage (). replace ( '.' , '/' ) ).replace ('.' , File .separatorChar );
102
105
}
103
106
104
107
@ Override
@@ -165,8 +168,8 @@ else if (p instanceof MapProperty) {
165
168
public String getSwaggerType (Property p ) {
166
169
String swaggerType = super .getSwaggerType (p );
167
170
String type = null ;
168
- if (typeMapping .containsKey (swaggerType )) {
169
- type = typeMapping .get (swaggerType );
171
+ if (typeMapping .containsKey (swaggerType . toLowerCase () )) {
172
+ type = typeMapping .get (swaggerType . toLowerCase () );
170
173
if (languageSpecificPrimitives .contains (type ))
171
174
return type ;
172
175
}
0 commit comments