-
Notifications
You must be signed in to change notification settings - Fork 188
针对1.1.0release版本中出现wrong number of arguments以及其衍生问题的处理。 #16
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
Conversation
2.修复了swagger无法读取到ApiImplicitParams的问题 3.增加了ApiImplicitParams和参数列表冲突时的处理规则:同名覆盖,否则新增 4.修复了dubbo服务无法被调用,抛出wrong number of arguments的错误 5.修复了在使用testng做单元测试时,引入swagger-dubbo存在注入异常的问题 6.修改了传参的具体规则。将简单类型参数和复杂对象均以url参数的形式进行传递。 7.修复了传入参数为对象时无法展示model的问题 8.增加了readme中的使用说明
同时在本次修改中,也思考了一些问题。 ################### |
很棒,我稍晚些时候做一次合并。 你说的第一个问题我是赞同的。 接口并不适合提供rest服务,不管是dubbo或者dubbox提供的rest服务,都不建议使用。在我司内部,这种应用场景是在开发自测、快速调试接口、验证dubbo接口返回值、测试人员测试dubbo接口等内部使用场景,不会在线上使用。 后面两个问题需要去解决,感谢交流沟通。 |
@JKTerrific 修复的第一个问题还有待考量,目前来看我这边无法重现你的问题。 原则上通过字节码操作,不需要指定编译参数的。 |
@@ -18,7 +19,7 @@ | |||
import io.swagger.models.Swagger; | |||
|
|||
@Component | |||
public class DubboPropertyConfig implements SwaggerConfig { | |||
public class DubboPropertyConfig implements SwaggerConfig, ServletContextAware { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么需要实现这个接口?ServletContext是可以直接注入的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为当我在继承自AbstractTestNGSpringContextTests的testng测试用例中使用到它时,无法直接注入servletcontext,需要使用这种方法来完成注入。而这种方法可以兼容之前的用法并且解决这个问题。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry.刚才检查了一下发现这个文件的修改存在一些问题。由于我的疏忽,private ServletContext servletContext;上的注解应该被去除。但是我提交的版本中并没有去除他。这是一个错误。
不知道为何,通过字节码的形式获取参数我本地任然无法获取到。或许您可以在一些关键的地方打上调试日志,我可以在运行时获取到这些日志并发送给您以方便定位这个奇怪的问题。 |
我在master新增了一些单元测试,所有单元测试必须通过,你可以试试。 |
修复了swagger-ui中无法显示返回结果泛型类型的问题。
1.修复了swagger无法读取到参数名称的问题
2.修复了swagger无法读取到ApiImplicitParams的问题
3.增加了ApiImplicitParams和参数列表冲突时的处理规则:同名覆盖,否则新增
4.修复了dubbo服务无法被调用,抛出wrong number of arguments的错误 #15
5.修复了在使用testng做单元测试时,引入swagger-dubbo存在注入异常的问题
6.修改了传参的具体规则。将简单类型参数和复杂对象均以url参数的形式进行传递。
7.修复了传入参数为对象时无法展示model的问题
8.增加了readme中的使用说明