forked from loafle/openapi-generator-original
remove supportsES6 option
This commit is contained in:
@@ -244,7 +244,6 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
||||
protected ENUM_PROPERTY_NAMING_TYPE enumPropertyNaming = ENUM_PROPERTY_NAMING_TYPE.PascalCase;
|
||||
protected PARAM_NAMING_TYPE paramNaming = PARAM_NAMING_TYPE.camelCase;
|
||||
protected boolean enumPropertyNamingReplaceSpecialChar = false;
|
||||
protected Boolean supportsES6 = false;
|
||||
protected Boolean nullSafeAdditionalProps = false;
|
||||
protected HashSet<String> languageGenericTypes;
|
||||
protected String npmName = null;
|
||||
@@ -356,7 +355,6 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
||||
cliOptions.add(new CliOption(CodegenConstants.ENUM_NAME_SUFFIX, CodegenConstants.ENUM_NAME_SUFFIX_DESC).defaultValue(this.enumSuffix));
|
||||
cliOptions.add(new CliOption(CodegenConstants.ENUM_PROPERTY_NAMING, CodegenConstants.ENUM_PROPERTY_NAMING_DESC).defaultValue(this.enumPropertyNaming.name()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING_DESC_WITH_WARNING).defaultValue(this.modelPropertyNaming.name()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.SUPPORTS_ES6, CodegenConstants.SUPPORTS_ES6_DESC).defaultValue(String.valueOf(this.getSupportsES6())));
|
||||
cliOptions.add(new CliOption(CodegenConstants.PARAM_NAMING, CodegenConstants.PARAM_NAMING_DESC).defaultValue(this.paramNaming.name()));
|
||||
this.cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package." +
|
||||
" Required to generate a full package"));
|
||||
@@ -403,8 +401,6 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
||||
setParamNaming((String) additionalProperties.get(CodegenConstants.PARAM_NAMING));
|
||||
}
|
||||
|
||||
setSupportsES6(convertPropertyToBooleanAndWriteBack(CodegenConstants.SUPPORTS_ES6));
|
||||
|
||||
if (additionalProperties.containsKey(NULL_SAFE_ADDITIONAL_PROPS)) {
|
||||
setNullSafeAdditionalProps(Boolean.valueOf(additionalProperties.get(NULL_SAFE_ADDITIONAL_PROPS).toString()));
|
||||
}
|
||||
@@ -1014,14 +1010,6 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setSupportsES6(Boolean value) {
|
||||
supportsES6 = value;
|
||||
}
|
||||
|
||||
public Boolean getSupportsES6() {
|
||||
return supportsES6;
|
||||
}
|
||||
|
||||
public Boolean getNullSafeAdditionalProps() {
|
||||
return nullSafeAdditionalProps;
|
||||
}
|
||||
|
||||
@@ -290,10 +290,7 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege
|
||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||
supportingFiles.add(new SupportingFile("package.mustache", "", "package.json"));
|
||||
supportingFiles.add(new SupportingFile("tsconfig.mustache", "", "tsconfig.json"));
|
||||
// in case ECMAScript 6 is supported add another tsconfig for an ESM (ECMAScript Module)
|
||||
if (supportsES6) {
|
||||
supportingFiles.add(new SupportingFile("tsconfig.esm.mustache", "", "tsconfig.esm.json"));
|
||||
}
|
||||
supportingFiles.add(new SupportingFile("tsconfig.esm.mustache", "", "tsconfig.esm.json"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -427,9 +427,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
|
||||
supportingFiles.add(new SupportingFile("package.mustache", "", "package.json"));
|
||||
supportingFiles.add(new SupportingFile("tsconfig.mustache", "", "tsconfig.json"));
|
||||
// in case ECMAScript 6 is supported add another tsconfig for an ESM (ECMAScript Module)
|
||||
if (supportsES6) {
|
||||
supportingFiles.add(new SupportingFile("tsconfig.esm.mustache", "", "tsconfig.esm.json"));
|
||||
}
|
||||
supportingFiles.add(new SupportingFile("tsconfig.esm.mustache", "", "tsconfig.esm.json"));
|
||||
supportingFiles.add(new SupportingFile("npmignore.mustache", "", ".npmignore"));
|
||||
supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore"));
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ public class TypeScriptAureliaClientOptionsTest extends AbstractOptionsTest {
|
||||
verify(clientCodegen).setSortParamsByRequiredFlag(Boolean.valueOf(TypeScriptAureliaClientOptionsProvider.SORT_PARAMS_VALUE));
|
||||
verify(clientCodegen).setModelPropertyNaming(TypeScriptAureliaClientOptionsProvider.MODEL_PROPERTY_NAMING_VALUE);
|
||||
verify(clientCodegen).setParamNaming(TypeScriptAureliaClientOptionsProvider.PARAM_NAMING_VALUE);
|
||||
verify(clientCodegen).setSupportsES6(TypeScriptAureliaClientOptionsProvider.SUPPORTS_ES6_VALUE);
|
||||
verify(clientCodegen).setPrependFormOrBodyParameters(Boolean.valueOf(TypeScriptAureliaClientOptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE));
|
||||
verify(clientCodegen).setEnumUnknownDefaultCase(Boolean.parseBoolean(TypeScriptAureliaClientOptionsProvider.ENUM_UNKNOWN_DEFAULT_CASE_VALUE));
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ public class TypeScriptFetchClientOptionsTest extends AbstractOptionsTest {
|
||||
verify(clientCodegen).setSortParamsByRequiredFlag(Boolean.valueOf(TypeScriptFetchClientOptionsProvider.SORT_PARAMS_VALUE));
|
||||
verify(clientCodegen).setModelPropertyNaming(TypeScriptFetchClientOptionsProvider.MODEL_PROPERTY_NAMING_VALUE);
|
||||
verify(clientCodegen).setParamNaming(TypeScriptFetchClientOptionsProvider.PARAM_NAMING_VALUE);
|
||||
verify(clientCodegen).setSupportsES6(TypeScriptFetchClientOptionsProvider.SUPPORTS_ES6_VALUE);
|
||||
verify(clientCodegen).setImportFileExtension(TypeScriptFetchClientOptionsProvider.IMPORT_FILE_EXTENSION_VALUE);
|
||||
verify(clientCodegen).setPrependFormOrBodyParameters(Boolean.valueOf(TypeScriptFetchClientOptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE));
|
||||
verify(clientCodegen).setWithoutRuntimeChecks(Boolean.valueOf(TypeScriptFetchClientOptionsProvider.WITHOUT_RUNTIME_CHECKS));
|
||||
|
||||
@@ -45,7 +45,6 @@ public class TypeScriptAngularClientOptionsTest extends AbstractOptionsTest {
|
||||
protected void verifyOptions() {
|
||||
verify(clientCodegen).setSortParamsByRequiredFlag(Boolean.valueOf(TypeScriptAngularClientOptionsProvider.SORT_PARAMS_VALUE));
|
||||
verify(clientCodegen).setModelPropertyNaming(TypeScriptAngularClientOptionsProvider.MODEL_PROPERTY_NAMING_VALUE);
|
||||
verify(clientCodegen).setSupportsES6(Boolean.valueOf(TypeScriptAngularClientOptionsProvider.SUPPORTS_ES6_VALUE));
|
||||
verify(clientCodegen).setStringEnums(Boolean.parseBoolean(TypeScriptAngularClientOptionsProvider.STRING_ENUMS_VALUE));
|
||||
verify(clientCodegen).setPrependFormOrBodyParameters(Boolean.valueOf(TypeScriptAngularClientOptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE));
|
||||
verify(clientCodegen).setQueryParamObjectFormat(TypeScriptAngularClientOptionsProvider.QUERY_PARAM_OBJECT_FORMAT_VALUE);
|
||||
|
||||
@@ -46,7 +46,6 @@ public class TypeScriptNestjsClientOptionsTest extends AbstractOptionsTest {
|
||||
verify(clientCodegen).setSortParamsByRequiredFlag(Boolean.valueOf(TypeScriptNestjsClientOptionsProvider.SORT_PARAMS_VALUE));
|
||||
verify(clientCodegen).setModelPropertyNaming(TypeScriptNestjsClientOptionsProvider.MODEL_PROPERTY_NAMING_VALUE);
|
||||
verify(clientCodegen).setParamNaming(TypeScriptNestjsClientOptionsProvider.PARAM_NAMING_VALUE);
|
||||
verify(clientCodegen).setSupportsES6(Boolean.valueOf(TypeScriptNestjsClientOptionsProvider.SUPPORTS_ES6_VALUE));
|
||||
verify(clientCodegen).setStringEnums(Boolean.parseBoolean(TypeScriptNestjsClientOptionsProvider.STRING_ENUMS_VALUE));
|
||||
verify(clientCodegen).setPrependFormOrBodyParameters(Boolean.valueOf(TypeScriptNestjsClientOptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE));
|
||||
verify(clientCodegen).setEnumUnknownDefaultCase(Boolean.parseBoolean(TypeScriptNestjsClientOptionsProvider.ENUM_UNKNOWN_DEFAULT_CASE_VALUE));
|
||||
|
||||
@@ -46,7 +46,6 @@ public class TypeScriptNodeClientOptionsTest extends AbstractOptionsTest {
|
||||
verify(clientCodegen).setSortParamsByRequiredFlag(Boolean.valueOf(TypeScriptNodeClientOptionsProvider.SORT_PARAMS_VALUE));
|
||||
verify(clientCodegen).setModelPropertyNaming(TypeScriptNodeClientOptionsProvider.MODEL_PROPERTY_NAMING_VALUE);
|
||||
verify(clientCodegen).setParamNaming(TypeScriptNodeClientOptionsProvider.PARAM_NAMING_VALUE);
|
||||
verify(clientCodegen).setSupportsES6(Boolean.valueOf(TypeScriptNodeClientOptionsProvider.SUPPORTS_ES6_VALUE));
|
||||
verify(clientCodegen).setPrependFormOrBodyParameters(Boolean.valueOf(TypeScriptNodeClientOptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE));
|
||||
verify(clientCodegen).setEnumUnknownDefaultCase(Boolean.parseBoolean(TypeScriptNodeClientOptionsProvider.ENUM_UNKNOWN_DEFAULT_CASE_VALUE));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user