-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
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
YAPI中枚举备注功能,autos是不是不支持,或者在哪能找到文档 #36
Comments
@BangXinWei 可以贴一下 swagger.json 内容 |
@gogoyqj "properties":{ swagger枚举注释,就是这个"enumDesc" 目前生成的结果是 |
还有个问题 "properties": { {test : number} //不会是枚举 number的枚举,不会生成,只会test 的类型 会是number |
这个我验证了,会生成如下结构的 enum:
|
确实不支持, |
倒是可以考虑把 enumDesc 拼凑到 description 一起 |
可以 |
这个我测了下,如果YAPI这个字段是string类型枚举,确实会生成 _enum的枚举。 |
@gogoyqj 大佬,有时间帮看看啊!主要可能是数字枚举的问题 |
这样的数字枚举在 ts 是非法的,所以不能生成(如以下示例,不知道我有没有 get 到你的意思) enum A {
1 = 1,
2 = 2,
} |
生成以下这样的呢,就和字符类型数字枚举一样
|
现在就是这么生成的,在前边加了一个下划线 |
在yapi中,对某个枚举,添加了枚举备注。
运行autos 生成的 yapi-swagger.json 中,enum有对应enumDesc是有的,然而在最终生成的ts枚举中,没有出现。
是不是枚举备注填写的格式不正确?
yapi和autos都没找到相关的文档。
The text was updated successfully, but these errors were encountered: