Skip to content

Commit

Permalink
[TypeScript Fetch] Default TypeScript fetch configuration to 3.6+ true
Browse files Browse the repository at this point in the history
…#9974 (#11331)

* Default TypeScript fetch configuration to 3.6+ true, as it's been out for a while now

* TypeScript fetch update the three plus CLI option default to true

* Apply doc generator patch

* Build the project and update samples

* remove VERSION

* test ts fetch clients first

* Revert "test ts fetch clients first"

This reverts commit 590a7f2.

Co-authored-by: szTheory <szTheory@users.noreply.github.com>
  • Loading branch information
wing328 and szTheory committed Jan 16, 2022
1 parent 156868e commit 341ad1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/generators/typescript-fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|supportsES6|Generate code that conforms to ES6.| |false|
|typescriptThreePlus|Setting this property to true will generate TypeScript 3.6+ compatible code.| |false|
|typescriptThreePlus|Setting this property to true will generate TypeScript 3.6+ compatible code.| |true|
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true|
|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false|
|withoutRuntimeChecks|Setting this property to true will remove any runtime checks on the request and response payloads. Payloads will be casted to their expected types.| |false|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
private boolean prefixParameterInterfaces = false;
protected boolean addedApiIndex = false;
protected boolean addedModelIndex = false;
protected boolean typescriptThreePlus = false;
protected boolean typescriptThreePlus = true;
protected boolean withoutRuntimeChecks = false;

// "Saga and Record" mode.
Expand Down Expand Up @@ -93,7 +93,7 @@ public TypeScriptFetchClientCodegen() {
this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
this.cliOptions.add(new CliOption(CodegenConstants.USE_SINGLE_REQUEST_PARAMETER, CodegenConstants.USE_SINGLE_REQUEST_PARAMETER_DESC, SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.TRUE.toString()));
this.cliOptions.add(new CliOption(PREFIX_PARAMETER_INTERFACES, "Setting this property to true will generate parameter interface declarations prefixed with API class name to avoid name conflicts.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
this.cliOptions.add(new CliOption(TYPESCRIPT_THREE_PLUS, "Setting this property to true will generate TypeScript 3.6+ compatible code.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
this.cliOptions.add(new CliOption(TYPESCRIPT_THREE_PLUS, "Setting this property to true will generate TypeScript 3.6+ compatible code.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.TRUE.toString()));
this.cliOptions.add(new CliOption(WITHOUT_RUNTIME_CHECKS, "Setting this property to true will remove any runtime checks on the request and response payloads. Payloads will be casted to their expected types.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
this.cliOptions.add(new CliOption(SAGAS_AND_RECORDS, "Setting this property to true will generate additional files for use with redux-saga and immutablejs.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
}
Expand Down

0 comments on commit 341ad1f

Please sign in to comment.