首页 > 解决方案 > 为什么 ng-openapi-gen 会发出警告

问题描述

我目前参与了一个 Angular 项目,我试图整理一下。让我烦恼的一件事是这些警告

> ng-openapi-gen --input src/assets/openapi-service-earkiv.json --output src/app/container/service-earkiv/generated

(node:21984) DeprecationWarning: ArgumentParser(): following options are renamed: 'addHelp' -> 'add_help'
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:21984) DeprecationWarning: The "version" argument to ArgumentParser is deprecated. Please use add_argument(..., { action: 'version', version: 'N', ... }) instead.
(node:21984) DeprecationWarning: _ActionsContainer.addArgument() is renamed to _ActionsContainer.add_argument()
(node:21984) DeprecationWarning: add_argument(): following options are renamed: 'defaultValue' -> 'default'
(node:21984) DeprecationWarning: use add_argument('-c', '--config', {...}) instead of add_argument([ '-c', '--config' ], { ... })
(node:21984) DeprecationWarning: ArgumentParser.parseArgs() is renamed to ArgumentParser.parse_args()
Generation from src/assets/openapi-service-earkiv.json finished with 49 models and 27 services.

我们正在运行最新的 ng-openapi-gen 版本,即0.17.2

标签: angularopenapi

解决方案


推荐阅读