mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-18 15:09:14 +00:00
add default timeout to calls (#1596)
add properties to send or not null values update deps
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user