Skip to content

Commit ab5cb4d

Browse files
committed
refactor: runned ensure-up-to-date locally
1 parent 74bd0e9 commit ab5cb4d

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

docs/generators/typescript-angular.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2525
|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0|
2626
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
2727
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
28-
|providedInRoot|Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0). IMPORTANT: Deprecated for angular version greater or equal to 9.0.0, use **providedIn** instead.| |true|
29-
|providedIn|Use this property to provide Injectables in wanted level (it is only valid in angular version greater or equal to 9.0.0).|<dl><dt>**none**</dt><dd>No providedIn (same as providedInRoot=false)</dd><dt>**root**</dt><dd>The application-level injector in most apps.</dd><dt>**platform**</dt><dd>A special singleton platform injector shared by all applications on the page.</dd><dt>**any**</dt><dd>Provides a unique instance in each lazy loaded module while all eagerly loaded modules share one instance.</dd></dl> |root|
28+
|providedIn|Use this property to provide Injectables in wanted level (it is only valid in angular version greater or equal to 9.0.0).|<dl><dt>**root**</dt><dd>The application-level injector in most apps.</dd><dt>**none**</dt><dd>No providedIn (same as providedInRoot=false)</dd><dt>**any**</dt><dd>Provides a unique instance in each lazy loaded module while all eagerly loaded modules share one instance.</dd><dt>**platform**</dt><dd>A special singleton platform injector shared by all applications on the page.</dd></dl>|root|
29+
|providedInRoot|Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0). IMPORTANT: Deprecated for angular version greater or equal to 9.0.0, use **providedIn** instead.| |false|
3030
|queryParamObjectFormat|The format for query param objects: 'dot', 'json', 'key'.| |dot|
3131
|serviceFileSuffix|The suffix of the file of the generated service (service&lt;suffix&gt;.ts).| |.service|
3232
|serviceSuffix|The suffix of the generated service.| |Service|

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,17 @@ public TypeScriptAngularClientCodegen() {
107107
"Use discriminators to create tagged unions instead of extending interfaces.",
108108
this.taggedUnions));
109109
this.cliOptions.add(CliOption.newBoolean(PROVIDED_IN_ROOT,
110-
"Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0).",
110+
"Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0). IMPORTANT: Deprecated for angular version greater or equal to 9.0.0, use **providedIn** instead.",
111111
false));
112-
this.cliOptions.add(new CliOption(PROVIDED_IN,
113-
"Use this property to provide Injectables in wanted level (it is only valid in angular version greater or equal to 9.0.0).").defaultValue("root"));
112+
CliOption providedInCliOpt = new CliOption(PROVIDED_IN,
113+
"Use this property to provide Injectables in wanted level (it is only valid in angular version greater or equal to 9.0.0).").defaultValue("root");
114+
Map<String, String> providedInOptions = new HashMap<>();
115+
providedInOptions.put(PROVIDED_IN_LEVEL.none.toString(), "No providedIn (same as providedInRoot=false)");
116+
providedInOptions.put(PROVIDED_IN_LEVEL.root.toString(), "The application-level injector in most apps.");
117+
providedInOptions.put(PROVIDED_IN_LEVEL.platform.toString(), "A special singleton platform injector shared by all applications on the page.");
118+
providedInOptions.put(PROVIDED_IN_LEVEL.any.toString(), "Provides a unique instance in each lazy loaded module while all eagerly loaded modules share one instance.");
119+
providedInCliOpt.setEnum(providedInOptions);
120+
this.cliOptions.add(providedInCliOpt);
114121
this.cliOptions.add(new CliOption(NG_VERSION, "The version of Angular. (At least 6.0.0)").defaultValue(this.ngVersion));
115122
this.cliOptions.add(new CliOption(API_MODULE_PREFIX, "The prefix of the generated ApiModule."));
116123
this.cliOptions.add(new CliOption(CONFIGURATION_PREFIX, "The prefix of the generated Configuration."));

samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/FILES

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.gitignore
2-
.openapi-generator-ignore
32
README.md
43
api.module.ts
54
api/api.ts

0 commit comments

Comments
 (0)