Chen Kairui
Chen Kairui
##### Checklist - [x] `npm test` passes - [x] tests and/or benchmarks are included - [x] documentation is changed or added - [x] commit message follows commit guidelines ##### Affected...
I use linter-flow without `npm i -g flow-bin`, and get error: > ~/.atom/packages/linter/lib/linter-registry.js:159 [Linter] Error running Flow Error: Failed to spawn command `flow`. Make sure `flow` is installed and on...
## 🐛 Bug Report Can not debug locked problem ## To Reproduce In VS Code, search and select a locked problem, e.g. 305  ## Expected behavior There are shortcuts...
## 问题表现 解析不出 controller action ## 复现数据示例 ```typescript // app/router.ts router .get( 'path/to/foo', middlewareBar, // 注意末尾有逗号 app.controller.foo.action, ) ``` ## 根本原因 34, 35行解析得太理想化了,建议在单元测试中补充边界case。 
因为 swagger-egg 是自己用正则解析 `app/router.ts` 文件内容,获取路由信息。 参考 node_modules/swagger-egg/lib/router_loader.js 中的 getRouter() 方法。 导致很多情况解析不出来,比如 * 使用 `egg-router-plus` * 使用 `'router-name'`` * `'path-match'` 不是字符串字面量,而是一个表达式或变量 ```javascript router.verb('path-match', app.controller.action); router.verb('router-name', 'path-match', app.controller.action); router.verb('path-match', middleware1, ..., middlewareN,...
`@description #responses {HttpStatus} {ResponseSchema} - {Description}` `#responses` 不写 Description 会报错 问题表现: 2022-03-29 16:26:30,117 ERROR 167275 [swagger-egg] Cannot read properties of null (reading 'pop') 抛出异常导致中断后续流程,解析不完整。 根本原因: 71行的正则写得太死,认为总是会存在 Description 。  另外,...
## 问题表现 有多个 `in body` 的 `#parameters` 时 ,将所生成的 `app/public/swagger/*.json` 返回给前端用于 [`@rtk-query/codegen-openapi`](https://redux-toolkit.js.org/rtk-query/usage/code-generation#openapi) ,会报错 `has multiple requestBodies` ## 根本原因 [按照OpenAPI 2.0示例,in body的 parameters 只有1个,用 properties 表示其中不同的参数](https://swagger.io/docs/specification/2-0/describing-request-body/#objects)。 但 swagger-egg 会生成多个 in body的...
## 问题复现步骤 eggjs新建 TS 项目。 `[email protected]`, `[email protected]` 正常写 `app/schema/definitions.ts` 。 先 `yarn run tsc` ,再 `yarn start` 。 ## 问题表现 ``` [egg-scripts] File '/app/schema/definitions.js' is a JavaScript file. Did you...
Support providing `String` value to `amd` option to specify custom module name as the first dependence, which should be underscore.js or lodash.js or any API-compatibled AMD module.
According to [editorconfig.org](http://editorconfig.org/): > trim_trailing_whitespace: set to true to remove any whitespace characters preceding newline characters and false to ensure it doesn't. I think when I set `.editorconfig` like below:...