Skip to content
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枚举值如果有中文,生成的ts代码中key为空 #40

Closed
QiannanXu opened this issue Oct 26, 2021 · 3 comments
Closed

yapi枚举值如果有中文,生成的ts代码中key为空 #40

QiannanXu opened this issue Oct 26, 2021 · 3 comments

Comments

@QiannanXu
Copy link

你好,

我们项目中使用的yapi定义了枚举,如图,其中有中文字符,和英文+中文字符

Screen Shot 2021-10-26 at 8 54 31 PM

但是生成的ts代码中,纯中文的enum生成的key为空,期望可以key,value值相同

Screen Shot 2021-10-26 at 8 56 24 PM

@gogoyqj
Copy link
Owner

gogoyqj commented Oct 27, 2021

你好,

我们项目中使用的yapi定义了枚举,如图,其中有中文字符,和英文+中文字符

Screen Shot 2021-10-26 at 8 54 31 PM

但是生成的ts代码中,纯中文的enum生成的key为空,期望可以key,value值相同

Screen Shot 2021-10-26 at 8 56 24 PM

这是依赖的底层 swagger-codegen java 代码不支持中文的原因造成,这块我研究一下,看看有没有办法支持

@QiannanXu
Copy link
Author

笔芯,谢谢~

@gogoyqj
Copy link
Owner

gogoyqj commented Oct 28, 2021

@QiannanXu [email protected] 已支持

@gogoyqj gogoyqj closed this as completed Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants