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 MethodDoc 类型友好显示问题 #344

Closed
visionarygit opened this issue Feb 20, 2021 · 5 comments · Fixed by #347
Closed

Yapi MethodDoc 类型友好显示问题 #344

visionarygit opened this issue Feb 20, 2021 · 5 comments · Fixed by #347
Labels
type: question&discussion Further information is requested

Comments

@visionarygit
Copy link
Contributor

现在生成的yapi针对dubbo 接口生成的文档显示的类型 只是object string 这种 没有全限定名 (com.xxx.xxx.Demo)这样会导致一些不能使用interface的端(比如nodeJs)在对接的时候无法准确知道类型,是否能优化下这块?

@tangcent
Copy link
Owner

具体是指哪一块?

@tangcent tangcent added the type: question&discussion Further information is requested label Feb 21, 2021
@visionarygit
Copy link
Contributor Author

mmexport1613915154065
这里 导出来没有明确的java类型

@tangcent
Copy link
Owner

这个类型只能选yapi提供的,具体类型可以通过配置来写到备注里.

param.doc=groovy:"类型:"+tool.uncapitalize(it.type().name().replace("java.lang.",""))

重构一下,让methodDoc也支持param.doc

@visionarygit
Copy link
Contributor Author

rBAoMGA0YyKAVnS1AABG7hgFx9g991
这种方式不能 生成参数对象内的 类型

@tangcent
Copy link
Owner

试试再加一条field.doc

field.doc=groovy:"类型:"+tool.uncapitalize(it.type().name().replace("java.lang.",""))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question&discussion Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants