chenshuai2144 / openapi2typescript

一个被大范围使用的小工具
307 stars 136 forks source link

建议把ApiResponse注解里的description内容加到前端service方法注释中 #116

Closed cui-xxu closed 1 year ago

cui-xxu commented 1 year ago

ApiResponse注解里的description内容,是对方法返回值的说明,前端开发人员是需要看到的。 代码方面,可以把 serviceGenerator 中510行 desc: functionName === newApi.summary ? newApi.description : [newApi.summary, newApi.description].filter((s) => s).join(' '), 改成 desc: functionName === newApi.summary ? newApi.description : [newApi.summary, newApi.description, newApi.responses?.default?.description ? 返回值: ${newApi.responses?.default?.description} : ''].filter((s) => s).join(' '),

chenshuai2144 commented 1 year ago

欢迎提 pr

cui-xxu commented 1 year ago

请问是需要我再提一个pr吗?

@.***

发件人: 陈帅 发送时间: 2023-08-04 13:52 收件人: chenshuai2144/openapi2typescript 抄送: cui-xxu; Author 主题: Re: [chenshuai2144/openapi2typescript] 建议把ApiResponse注解里的description内容加到前端service方法注释中 (Issue #116) 欢迎提 pr — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

chenshuai2144 commented 1 year ago

随时欢迎