diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md
index a4f4647e009..f1624cb6828 100644
--- a/docs/generators/swift5.md
+++ b/docs/generators/swift5.md
@@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|hashableModels|Make hashable models (default: true)| |true|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
-|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false|
|library|Library template (sub-template) to use|- **urlsession**
- [DEFAULT] HTTP client: URLSession
- **alamofire**
- HTTP client: Alamofire
- **vapor**
- HTTP client: Vapor
|urlsession|
|mapFileBinaryToData|[WARNING] This option will be removed and enabled by default in the future once we've enhanced the code to work with `Data` in all the different situations. Map File and Binary to Data (default: false)| |false|
|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null|
diff --git a/docs/generators/swift6.md b/docs/generators/swift6.md
index 3da134734b8..2db4ad7bafa 100644
--- a/docs/generators/swift6.md
+++ b/docs/generators/swift6.md
@@ -29,7 +29,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|hashableModels|Make hashable models (default: true)| |true|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
-|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false|
|library|Library template (sub-template) to use|- **urlsession**
- [DEFAULT] HTTP client: URLSession
- **alamofire**
- HTTP client: Alamofire
- **vapor**
- HTTP client: Vapor
|urlsession|
|mapFileBinaryToData|[WARNING] This option will be removed and enabled by default in the future once we've enhanced the code to work with `Data` in all the different situations. Map File and Binary to Data (default: false)| |false|
|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null|
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java
index 01069149b14..13595c2a5df 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java
@@ -64,7 +64,6 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
public static final String READONLY_PROPERTIES = "readonlyProperties";
public static final String SWIFT_USE_API_NAMESPACE = "swiftUseApiNamespace";
public static final String DEFAULT_POD_AUTHORS = "OpenAPI Generator";
- public static final String LENIENT_TYPE_CAST = "lenientTypeCast";
public static final String USE_SPM_FILE_STRUCTURE = "useSPMFileStructure";
public static final String SWIFT_PACKAGE_PATH = "swiftPackagePath";
public static final String ONE_OF_UNKNOWN_DEFAULT_CASE = "oneOfUnknownDefaultCase";
@@ -88,7 +87,6 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
@Setter protected String projectName = "OpenAPIClient";
@Setter protected boolean nonPublicApi = false;
@Setter protected boolean objcCompatible = false;
- @Setter protected boolean lenientTypeCast = false;
@Setter protected boolean readonlyProperties = false;
@Setter protected boolean swiftUseApiNamespace = false;
@Setter protected boolean useSPMFileStructure = false;
@@ -284,10 +282,6 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP,
CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC)
.defaultValue(Boolean.TRUE.toString()));
- cliOptions.add(new CliOption(LENIENT_TYPE_CAST,
- "Accept and cast values for simple types (string->bool, "
- + "string->int, int->string)")
- .defaultValue(Boolean.FALSE.toString()));
cliOptions.add(new CliOption(USE_BACKTICK_ESCAPES,
"Escape reserved words using backticks (default: false)")
.defaultValue(Boolean.FALSE.toString()));
@@ -552,8 +546,6 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
}
additionalProperties.put(VALIDATABLE, validatable);
- setLenientTypeCast(convertPropertyToBooleanAndWriteBack(LENIENT_TYPE_CAST));
-
// make api and model doc path available in mustache template
additionalProperties.put("apiDocPath", apiDocPath);
additionalProperties.put("modelDocPath", modelDocPath);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift6ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift6ClientCodegen.java
index 276c8d63c27..98ff9795306 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift6ClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift6ClientCodegen.java
@@ -64,7 +64,6 @@ public class Swift6ClientCodegen extends DefaultCodegen implements CodegenConfig
public static final String READONLY_PROPERTIES = "readonlyProperties";
public static final String SWIFT_USE_API_NAMESPACE = "swiftUseApiNamespace";
public static final String DEFAULT_POD_AUTHORS = "OpenAPI Generator";
- public static final String LENIENT_TYPE_CAST = "lenientTypeCast";
public static final String USE_SPM_FILE_STRUCTURE = "useSPMFileStructure";
public static final String SWIFT_PACKAGE_PATH = "swiftPackagePath";
public static final String ONE_OF_UNKNOWN_DEFAULT_CASE = "oneOfUnknownDefaultCase";
@@ -95,8 +94,6 @@ public class Swift6ClientCodegen extends DefaultCodegen implements CodegenConfig
@Setter
protected boolean objcCompatible = false;
@Setter
- protected boolean lenientTypeCast = false;
- @Setter
protected boolean readonlyProperties = false;
@Setter
protected boolean swiftUseApiNamespace = false;
@@ -314,10 +311,6 @@ public class Swift6ClientCodegen extends DefaultCodegen implements CodegenConfig
cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP,
CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC)
.defaultValue(Boolean.TRUE.toString()));
- cliOptions.add(new CliOption(LENIENT_TYPE_CAST,
- "Accept and cast values for simple types (string->bool, "
- + "string->int, int->string)")
- .defaultValue(Boolean.FALSE.toString()));
cliOptions.add(new CliOption(USE_BACKTICK_ESCAPES,
"Escape reserved words using backticks (default: false)")
.defaultValue(Boolean.FALSE.toString()));
@@ -604,8 +597,6 @@ public class Swift6ClientCodegen extends DefaultCodegen implements CodegenConfig
}
additionalProperties.put(COMBINE_DEFERRED, combineDeferred);
- setLenientTypeCast(convertPropertyToBooleanAndWriteBack(LENIENT_TYPE_CAST));
-
// make api and model doc path available in mustache template
additionalProperties.put("apiDocPath", apiDocPath);
additionalProperties.put("modelDocPath", modelDocPath);
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java
index 2324a669316..35dd0de4ff1 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java
@@ -31,7 +31,6 @@ public class Swift5OptionsProvider implements OptionsProvider {
public static final String RESPONSE_AS_VALUE = "test";
public static final String NON_PUBLIC_API_REQUIRED_VALUE = "false";
public static final String OBJC_COMPATIBLE_VALUE = "false";
- public static final String LENIENT_TYPE_CAST_VALUE = "false";
public static final String POD_SOURCE_VALUE = "{ :git => 'git@github.com:swagger-api/swagger-mustache.git'," +
" :tag => 'v1.0.0-SNAPSHOT' }";
public static final String POD_VERSION_VALUE = "v1.0.0-SNAPSHOT";
@@ -71,7 +70,6 @@ public class Swift5OptionsProvider implements OptionsProvider {
.put(Swift5ClientCodegen.RESPONSE_AS, RESPONSE_AS_VALUE)
.put(CodegenConstants.NON_PUBLIC_API, NON_PUBLIC_API_REQUIRED_VALUE)
.put(Swift5ClientCodegen.OBJC_COMPATIBLE, OBJC_COMPATIBLE_VALUE)
- .put(Swift5ClientCodegen.LENIENT_TYPE_CAST, LENIENT_TYPE_CAST_VALUE)
.put(Swift5ClientCodegen.POD_SOURCE, POD_SOURCE_VALUE)
.put(CodegenConstants.POD_VERSION, POD_VERSION_VALUE)
.put(Swift5ClientCodegen.POD_AUTHORS, POD_AUTHORS_VALUE)
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift6ClientCodegenOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift6ClientCodegenOptionsProvider.java
index 880fde92405..94be51999d3 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift6ClientCodegenOptionsProvider.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift6ClientCodegenOptionsProvider.java
@@ -32,7 +32,6 @@ public class Swift6ClientCodegenOptionsProvider implements OptionsProvider {
public static final String RESPONSE_AS_VALUE = "test";
public static final String NON_PUBLIC_API_REQUIRED_VALUE = "false";
public static final String OBJC_COMPATIBLE_VALUE = "false";
- public static final String LENIENT_TYPE_CAST_VALUE = "false";
public static final String POD_SOURCE_VALUE = "{ :git => 'git@github.com:swagger-api/swagger-mustache.git'," +
" :tag => 'v1.0.0-SNAPSHOT' }";
public static final String POD_VERSION_VALUE = "v1.0.0-SNAPSHOT";
@@ -74,7 +73,6 @@ public class Swift6ClientCodegenOptionsProvider implements OptionsProvider {
.put(Swift6ClientCodegen.RESPONSE_AS, RESPONSE_AS_VALUE)
.put(CodegenConstants.NON_PUBLIC_API, NON_PUBLIC_API_REQUIRED_VALUE)
.put(Swift6ClientCodegen.OBJC_COMPATIBLE, OBJC_COMPATIBLE_VALUE)
- .put(Swift6ClientCodegen.LENIENT_TYPE_CAST, LENIENT_TYPE_CAST_VALUE)
.put(Swift6ClientCodegen.POD_SOURCE, POD_SOURCE_VALUE)
.put(CodegenConstants.POD_VERSION, POD_VERSION_VALUE)
.put(Swift6ClientCodegen.POD_AUTHORS, POD_AUTHORS_VALUE)
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5OptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5OptionsTest.java
index 8eba7d9c3e3..fdea21bdd8e 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5OptionsTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5OptionsTest.java
@@ -45,7 +45,6 @@ public class Swift5OptionsTest extends AbstractOptionsTest {
verify(clientCodegen).setResponseAs(Swift5OptionsProvider.RESPONSE_AS_VALUE.split(","));
verify(clientCodegen).setNonPublicApi(Boolean.parseBoolean(Swift5OptionsProvider.NON_PUBLIC_API_REQUIRED_VALUE));
verify(clientCodegen).setObjcCompatible(Boolean.parseBoolean(Swift5OptionsProvider.OBJC_COMPATIBLE_VALUE));
- verify(clientCodegen).setLenientTypeCast(Boolean.parseBoolean(Swift5OptionsProvider.LENIENT_TYPE_CAST_VALUE));
verify(clientCodegen).setPrependFormOrBodyParameters(Boolean.valueOf(Swift5OptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE));
verify(clientCodegen).setReadonlyProperties(Boolean.parseBoolean(Swift5OptionsProvider.READONLY_PROPERTIES_VALUE));
verify(clientCodegen).setGenerateModelAdditionalProperties(Boolean.parseBoolean(Swift5OptionsProvider.GENERATE_MODEL_ADDITIONAL_PROPERTIES_VALUE));
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift6/Swift6ClientCodegenOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift6/Swift6ClientCodegenOptionsTest.java
index 676390038da..ee2ab3d21a5 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift6/Swift6ClientCodegenOptionsTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift6/Swift6ClientCodegenOptionsTest.java
@@ -46,7 +46,6 @@ public class Swift6ClientCodegenOptionsTest extends AbstractOptionsTest {
verify(clientCodegen)
.setNonPublicApi(Boolean.parseBoolean(Swift6ClientCodegenOptionsProvider.NON_PUBLIC_API_REQUIRED_VALUE));
verify(clientCodegen).setObjcCompatible(Boolean.parseBoolean(Swift6ClientCodegenOptionsProvider.OBJC_COMPATIBLE_VALUE));
- verify(clientCodegen).setLenientTypeCast(Boolean.parseBoolean(Swift6ClientCodegenOptionsProvider.LENIENT_TYPE_CAST_VALUE));
verify(clientCodegen).setPrependFormOrBodyParameters(
Boolean.valueOf(Swift6ClientCodegenOptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE));
verify(clientCodegen)