zouwenxmu opened a new issue #1690: 接口使用swagger注解,@ApiResponse里面@Example解析不出来 URL: https://github.com/apache/servicecomb-java-chassis/issues/1690 `@ApiResponses({` `@ApiResponse(code=200, message="success",` `examples=@Example({` `@ExampleProperty(value = "{'user':'test1'}", mediaType = "application/json")` `})),` `@ApiResponse(code=400, message="parameters are not correct"),` `@ApiResponse(code=404, message="path is not correct")` `})` generate swagger for demo/test, swagger: ---,生成的schema里面response没有打印出examples; 调试了一下AnnotationUtils.addResponse方法,generateResponse里面没有考虑解析Example。当前正在尝试扩展MethodAnnotationProcessor来增加Example的处理,希望官方可以支持一下 `public static void addResponse(Swagger swagger, Operation operation, ApiResponse apiResponse) {` `ResponseConfig responseConfig = convert(apiResponse);` `generateResponse(swagger, responseConfig);` `mergeResponse(operation, responseConfig);` `}`
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
