add default timeout to calls (#1596)

add properties to send or not null values
update deps
This commit is contained in:
Jaumard
2018-12-06 11:34:01 +01:00
committed by William Cheng
parent d57009d14d
commit d40cbf9dbd
29 changed files with 785 additions and 369 deletions

View File

@@ -16,6 +16,7 @@
package org.openapitools.codegen.languages;
import org.openapitools.codegen.CliOption;
import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.CodegenModel;
import org.openapitools.codegen.CodegenOperation;
@@ -36,6 +37,7 @@ import java.util.Set;
import static org.openapitools.codegen.utils.StringUtils.underscore;
public class DartJaguarClientCodegen extends DartClientCodegen {
private static final String NULLABLE_FIELDS = "nullableFields";
private static Set<String> modelToIgnore = new HashSet<>();
static {
@@ -45,11 +47,15 @@ public class DartJaguarClientCodegen extends DartClientCodegen {
modelToIgnore.add("file");
}
private boolean nullableFields = true;
public DartJaguarClientCodegen() {
super();
browserClient = false;
outputFolder = "generated-code/dart-jaguar";
embeddedTemplateDir = templateDir = "dart-jaguar";
cliOptions.add(new CliOption(NULLABLE_FIELDS, "Is the null fields should be in the JSON payload"));
}
@Override
@@ -74,6 +80,13 @@ public class DartJaguarClientCodegen extends DartClientCodegen {
@Override
public void processOpts() {
if (additionalProperties.containsKey(NULLABLE_FIELDS)) {
nullableFields = convertPropertyToBooleanAndWriteBack(NULLABLE_FIELDS);
} else {
//not set, use to be passed to template
additionalProperties.put(NULLABLE_FIELDS, nullableFields);
}
if (additionalProperties.containsKey(PUB_NAME)) {
this.setPubName((String) additionalProperties.get(PUB_NAME));
} else {