Closed elpwc closed 2 years ago
设置 serversPath 後,运行 npm run openapi 报错:
serversPath
npm run openapi
PS > npm run openapi > umi openapi Validate config "openAPI" failed, "serversPath" is not allowed ValidationError: "serversPath" is not allowed
.umirc.ts 内容:
import * as appconfig from './appconfig'; export default { openAPI: { requestLibPath: "import request from '../../utils/request'", schemaPath: `${appconfig.default.apiBaseURL}/api-json`, mock: false, serversPath: './services/', }, };
放弃 umi 配置,直接使用 openapi.config.ts 後成功生成了
openapi.config.ts
设置
serversPath
後,运行npm run openapi
报错:.umirc.ts 内容: