Remove redundant browserClient (#7595)

This commit is contained in:
agilob
2020-10-05 06:39:38 +01:00
committed by GitHub
parent 61b543f03d
commit 0e1d131076
4 changed files with 4 additions and 19 deletions

View File

@@ -67,7 +67,6 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
public static final String PUB_HOMEPAGE = "pubHomepage";
public static final String USE_ENUM_EXTENSION = "useEnumExtension";
protected boolean browserClient = true;
protected String pubName = "openapi";
protected String pubVersion = "1.0.0";
protected String pubDescription = "OpenAPI API client";
@@ -549,10 +548,6 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
return camelize(operationId, true);
}
public void setBrowserClient(boolean browserClient) {
this.browserClient = browserClient;
}
public void setPubName(String pubName) {
this.pubName = pubName;
}

View File

@@ -40,7 +40,6 @@ import java.util.Set;
import io.swagger.v3.oas.models.media.Schema;
import static org.openapitools.codegen.utils.OnceLogger.once;
import static org.openapitools.codegen.utils.StringUtils.camelize;
import static org.openapitools.codegen.utils.StringUtils.underscore;
@@ -48,10 +47,10 @@ public class DartDioClientCodegen extends DartClientCodegen {
private static final Logger LOGGER = LoggerFactory.getLogger(DartDioClientCodegen.class);
public static final String NULLABLE_FIELDS = "nullableFields";
private static final String IS_FORMAT_JSON = "jsonFormat";
private static final String CLIENT_NAME = "clientName";
public static final String DATE_LIBRARY = "dateLibrary";
private static final String IS_FORMAT_JSON = "jsonFormat";
private static final String CLIENT_NAME = "clientName";
private static Set<String> modelToIgnore = new HashSet<>();
static {
@@ -63,14 +62,11 @@ public class DartDioClientCodegen extends DartClientCodegen {
modelToIgnore.add("uint8list");
}
private static final String SERIALIZATION_JSON = "json";
private boolean nullableFields = true;
private String dateLibrary = "core";
public DartDioClientCodegen() {
super();
browserClient = false;
outputFolder = "generated-code/dart-dio";
embeddedTemplateDir = "dart-dio";
this.setTemplateDir(embeddedTemplateDir);
@@ -124,11 +120,6 @@ public class DartDioClientCodegen extends DartClientCodegen {
return "Generates a Dart Dio client library.";
}
@Override
public void setBrowserClient(boolean browserClient) {
super.browserClient = browserClient;
}
@Override
public String toDefaultValue(Schema schema) {
if (ModelUtils.isMapSchema(schema)) {

View File

@@ -30,11 +30,11 @@ import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.*;
import static org.openapitools.codegen.utils.OnceLogger.once;
import static org.openapitools.codegen.utils.StringUtils.underscore;
public class DartJaguarClientCodegen extends DartClientCodegen {
private static final Logger LOGGER = LoggerFactory.getLogger(DartJaguarClientCodegen.class);
private static final String NULLABLE_FIELDS = "nullableFields";
private static final String SERIALIZATION_FORMAT = "serialization";
private static final String IS_FORMAT_JSON = "jsonFormat";
@@ -86,7 +86,6 @@ public class DartJaguarClientCodegen extends DartClientCodegen {
)
);
browserClient = false;
outputFolder = "generated-code/dart-jaguar";
embeddedTemplateDir = templateDir = "dart-jaguar";

View File

@@ -10,7 +10,7 @@ class QueryParam {
class ApiClient {
String basePath;
var client = new {{#browserClient}}Browser{{/browserClient}}Client();
var client = new Client();
Map<String, String> _defaultHeaderMap = {};
Map<String, Authentication> _authentications = {};