-
Notifications
You must be signed in to change notification settings - Fork 188
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
dubbo入参对象没有解析 #17
Comments
升级swagger-dubbo到2.0.1版本试试。 基于 @JKTerrific 的PR #16 做了一点点的修改。 |
swagger-dubbo到2.0.1版本 返回的json参数 没有显示到swagger页面上,显示以下 Response Body |
这是服务端没响应,看看服务是否正常启动了,是否有异常日志。 |
你这个return是有数据的,到swagger页面就没有了 @RequestMapping(value = "/{interfaceClass}/{methodName}", produces = "application/json; charset=utf-8") |
可以把api-docs暴露的JSON数据发给我吗? |
找的问题了,还是SwaggerDubboController 跨域问题 |
文档上有推荐的跨域做法,如果Spring版本过低,自己写个拦截器 对/sawgger-dubbo/api-docs 设置跨域。 |
由于swagger作为独立服务不集成到项目中(尽可能降低耦合), springboot 跨域 DubboHttpController和SwaggerDubboController 都要加上,否则会有上面的问题 |
我也遇到这个情况了 看了一下代码: 里面解析使用: POST/RequestBody 下无法获取到值。 debug过程: 获取到传入 request.getParameter(parameterNames[i])) 无法获取到参数,suggestPrameterValue null 将request 解析 |
入参对象没有解析出来
ChannelOutput offlineRefund(OfflineRefundInput)线下退款
最好将OfflineRefundInput内部属性解析并展示出来。
json片段:
"/h/com.huifenqi.jedi.resultprocess.facade.RefundFacade/offlineRefund": {
"post": {
"tags": [
"RefundFacade"
],
"summary": "线下退款",
"description": "ChannelOutput offlineRefund(com.huifenqi.jedi.resultprocess.params.OfflineRefundInput)线下退款",
"operationId": "offlineRefund",
"parameters": [
{
"name": "offlineRefundInput",
"in": "formData",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/ChannelOutput"
}
}
}
}
},
The text was updated successfully, but these errors were encountered: