mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 06:00:52 +00:00
Updating the mono compile script to target .net 2
This commit is contained in:
parent
a6012ecf41
commit
0247f0774d
@ -101,8 +101,12 @@ public class Unity3DCsharpDotNet2ClientCodegen extends DefaultCodegen implements
|
||||
additionalProperties.put("packageName", packageName);
|
||||
}
|
||||
|
||||
additionalProperties.put("clientPackage", clientPackage);
|
||||
|
||||
if (additionalProperties.containsKey("clientPackage")) {
|
||||
this.setClientPackage((String) additionalProperties.get("clientPackage"));
|
||||
} else {
|
||||
additionalProperties.put("clientPackage", clientPackage);
|
||||
}
|
||||
|
||||
supportingFiles.add(new SupportingFile("Configuration.mustache",
|
||||
(sourceFolder + File.separator + clientPackage).replace(".", java.io.File.separator), "Configuration.cs"));
|
||||
supportingFiles.add(new SupportingFile("ApiClient.mustache",
|
||||
@ -110,12 +114,15 @@ public class Unity3DCsharpDotNet2ClientCodegen extends DefaultCodegen implements
|
||||
supportingFiles.add(new SupportingFile("ApiException.mustache",
|
||||
(sourceFolder + File.separator + clientPackage).replace(".", java.io.File.separator), "ApiException.cs"));
|
||||
supportingFiles.add(new SupportingFile("packages.config.mustache", "vendor", "packages.config"));
|
||||
supportingFiles.add(new SupportingFile("compile.mustache", "", "compile.bat"));
|
||||
supportingFiles.add(new SupportingFile("compile-mono.sh.mustache", "", "compile-mono.sh"));
|
||||
supportingFiles.add(new SupportingFile("README.md", "", "README.md"));
|
||||
|
||||
}
|
||||
|
||||
public void setClientPackage(String clientPackage) {
|
||||
this.clientPackage = clientPackage;
|
||||
}
|
||||
|
||||
public CodegenType getTag() {
|
||||
return CodegenType.CLIENT;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ namespace {{packageName}}.Client
|
||||
if (obj is DateTime)
|
||||
return ((DateTime)obj).ToString ("u");
|
||||
else if (obj is List<string>)
|
||||
return String.Join(",", obj as List<string>);
|
||||
return String.Join(",", (obj as List<string>).ToArray());
|
||||
else
|
||||
return Convert.ToString (obj);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ wget -nc https://nuget.org/nuget.exe;
|
||||
mozroots --import --sync
|
||||
mono nuget.exe install vendor/packages.config -o vendor;
|
||||
mkdir -p bin;
|
||||
mcs -r:vendor/Newtonsoft.Json.7.0.1/lib/net20/Newtonsoft.Json.dll,\
|
||||
mcs -sdk:2 -r:vendor/Newtonsoft.Json.7.0.1/lib/net20/Newtonsoft.Json.dll,\
|
||||
vendor/RestSharp.Net2.1.1.11/lib/net20/RestSharp.Net2.dll,\
|
||||
System.Runtime.Serialization.dll \
|
||||
-target:library \
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user