update cli option in Dart (#3627)

This commit is contained in:
William Cheng 2019-08-13 17:13:50 +08:00 committed by GitHub
parent ba65f675e2
commit fae0528cd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -11,12 +11,12 @@ sidebar_label: dart-jaguar
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|browserClient|Is the client browser based| |null| |browserClient|Is the client browser based (for Dart 1.x only)| |null|
|pubName|Name in generated pubspec| |null| |pubName|Name in generated pubspec| |null|
|pubVersion|Version in generated pubspec| |null| |pubVersion|Version in generated pubspec| |null|
|pubDescription|Description in generated pubspec| |null| |pubDescription|Description in generated pubspec| |null|
|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| |useEnumExtension|Allow the 'x-enum-values' extension for enums| |null|
|sourceFolder|source folder for generated code| |null| |sourceFolder|Source folder for generated code| |null|
|supportDart2|support dart2| |true| |supportDart2|Support Dart 2.x| |true|
|nullableFields|Is the null fields should be in the JSON payload| |null| |nullableFields|Is the null fields should be in the JSON payload| |null|
|serialization|Choose serialization format JSON or PROTO is supported| |null| |serialization|Choose serialization format JSON or PROTO is supported| |null|

View File

@ -11,10 +11,10 @@ sidebar_label: dart
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|browserClient|Is the client browser based| |null| |browserClient|Is the client browser based (for Dart 1.x only)| |null|
|pubName|Name in generated pubspec| |null| |pubName|Name in generated pubspec| |null|
|pubVersion|Version in generated pubspec| |null| |pubVersion|Version in generated pubspec| |null|
|pubDescription|Description in generated pubspec| |null| |pubDescription|Description in generated pubspec| |null|
|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| |useEnumExtension|Allow the 'x-enum-values' extension for enums| |null|
|sourceFolder|source folder for generated code| |null| |sourceFolder|Source folder for generated code| |null|
|supportDart2|support dart2| |true| |supportDart2|Support Dart 2.x| |true|

View File

@ -118,13 +118,13 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("URI", "String"); typeMapping.put("URI", "String");
typeMapping.put("ByteArray", "String"); typeMapping.put("ByteArray", "String");
cliOptions.add(new CliOption(BROWSER_CLIENT, "Is the client browser based")); cliOptions.add(new CliOption(BROWSER_CLIENT, "Is the client browser based (for Dart 1.x only)"));
cliOptions.add(new CliOption(PUB_NAME, "Name in generated pubspec")); cliOptions.add(new CliOption(PUB_NAME, "Name in generated pubspec"));
cliOptions.add(new CliOption(PUB_VERSION, "Version in generated pubspec")); cliOptions.add(new CliOption(PUB_VERSION, "Version in generated pubspec"));
cliOptions.add(new CliOption(PUB_DESCRIPTION, "Description in generated pubspec")); cliOptions.add(new CliOption(PUB_DESCRIPTION, "Description in generated pubspec"));
cliOptions.add(new CliOption(USE_ENUM_EXTENSION, "Allow the 'x-enum-values' extension for enums")); cliOptions.add(new CliOption(USE_ENUM_EXTENSION, "Allow the 'x-enum-values' extension for enums"));
cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, "source folder for generated code")); cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, "Source folder for generated code"));
cliOptions.add(CliOption.newBoolean(SUPPORT_DART2, "support dart2").defaultValue(Boolean.TRUE.toString())); cliOptions.add(CliOption.newBoolean(SUPPORT_DART2, "Support Dart 2.x").defaultValue(Boolean.TRUE.toString()));
} }
@Override @Override