We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在实际开发中 OpenApi 文件生成的枚举 不能直观的用到,容易混淆 插件生成 export type RoleTypeEnum = 10 | 20 | 30 | 40; 希望达到的效果 export enum RoleTypeEnum { 系统角色 = 10, 公司角色 = 20, 部门角色 = 30, 个人角色 = 40, } 在业务中 if (RoleTypeEnum.系统角色 == info.value.type)
提高代码复用率, 精确锁定引用
我的解决思路: 1.独立一个新的枚举 2.规定代码格式 3.alova.config.ts 是否更新排除枚举文件
The text was updated successfully, but these errors were encountered:
我看可以使用一个external字段排除要生成的类型,顶部导入语句可以用户配置。 不过需要$ref符合命名规范,比如:$ref:"#/components/schemas/AddDeptParam"。而不是“#/components/schemas/你好_xxx”。然后exteranl就可以配置["AddDeptParam" ],externalImport:"import {AddDeptParam} from "./foo/xxxx.ts""
Sorry, something went wrong.
czhlin
No branches or pull requests
在实际开发中 OpenApi 文件生成的枚举 不能直观的用到,容易混淆
插件生成
export type RoleTypeEnum = 10 | 20 | 30 | 40;
希望达到的效果
export enum RoleTypeEnum {
系统角色 = 10,
公司角色 = 20,
部门角色 = 30,
个人角色 = 40,
}
在业务中
if (RoleTypeEnum.系统角色 == info.value.type)
提高代码复用率, 精确锁定引用
我的解决思路:
1.独立一个新的枚举
2.规定代码格式
3.alova.config.ts 是否更新排除枚举文件
The text was updated successfully, but these errors were encountered: