swagger
Posted cashew
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了swagger相关的知识,希望对你有一定的参考价值。
Controller类
方法
@ApiOperation(value = "扫码付中转接口")不写显示方法名
@RequestMapping(value = "/pay/orderNum", method = RequestMethod.GET)或者
入参:@PathVariable String orderNum, HttpServletRequest request, HttpServletResponse response
@ApiOperation(value = "小程序支付", notes = "微信设备端使用")
@ApiImplicitParams(
@ApiImplicitParam(name = "subject", value = "支付的显示页面的标题", required = true, dataType = "String"),
@ApiImplicitParam(name = "outTradeNo", value = "本地订单号", required = true, dataType = "String"),
@ApiImplicitParam(name = "openId", value = "用户OPENID", required = true, dataType = "String")
)
实体类
@ApiModel
属性
@ApiModelProperty(value="主键")
private String id;
以上是关于swagger的主要内容,如果未能解决你的问题,请参考以下文章