forked from loafle/openapi-generator-original
add validatable flag for .net 3.5 (#5544)
This commit is contained in:
@@ -188,13 +188,15 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
}
|
||||
|
||||
additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage);
|
||||
|
||||
additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage);
|
||||
|
||||
additionalProperties.put("clientPackage", clientPackage);
|
||||
|
||||
additionalProperties.put("emitDefaultValue", optionalEmitDefaultValue);
|
||||
|
||||
if (!additionalProperties.containsKey("validatable")) {
|
||||
// default validatable to true if not set
|
||||
additionalProperties.put("validatable", true);
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(CodegenConstants.DOTNET_FRAMEWORK)) {
|
||||
setTargetFramework((String) additionalProperties.get(CodegenConstants.DOTNET_FRAMEWORK));
|
||||
} else {
|
||||
@@ -209,6 +211,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
if(additionalProperties.containsKey("supportsAsync")){
|
||||
additionalProperties.remove("supportsAsync");
|
||||
}
|
||||
additionalProperties.put("validatable", false);
|
||||
} else if (NETSTANDARD.equals(this.targetFramework)){
|
||||
setTargetFrameworkNuget("netstandard1.3");
|
||||
setSupportsAsync(Boolean.TRUE);
|
||||
|
||||
Reference in New Issue
Block a user