2017-07-04 1 views
0
@ApiOperation(value = "获取打卡信息", notes = "获取打卡信息") 
@RequestMapping(method = RequestMethod.GET, value = "/{mPhone}/{mPassword}/{date}") 
@ApiImplicitParams({ 
     @ApiImplicitParam(name = "mPhone", value = "手机号", required = true, dataType = "String",defaultValue="13268690268",paramType="Path"), 
     @ApiImplicitParam(name = "mPassword", value = "密码", required = true, dataType = "String",defaultValue="111111",paramType="Path"), 
     @ApiImplicitParam(name = "date", value = "日期", required = true, dataType = "String",defaultValue="2017-07-04",paramType="Path"), 
     @ApiImplicitParam(name = "httpSession", value = "Session", required = false)}) 
public @ResponseBody String getSignInfo(@PathVariable String mPhone, @PathVariable String mPassword, 
     @PathVariable String date, 
     HttpSession httpSession) { 
....... 
} 

enter image description hereSpringfoxで闊歩でセッションパラメータを非表示にする方法

私は、ドキュメントからこのパラメータ(HttpSessionの)を削除したい、と私は助けを必要としています。

答えて

0

Springfoxは、これらの値が表示されませんデフォルトではあなたは暗黙のパラメータとして自分でそれを追加しましたのでhttpSessionは、あなたの場合に表示されている理由は、次のとおりです。

@ApiImplicitParam(name = "httpSession", value = "Session", required = false) 

あなたはhttpSessionは、ポップアップし、あなたの暗黙のパラメータからそれを削除したくない場合。また、あなたも、あなたのケースで@ApiImplicitParamを使用する必要はありません、あなたは@ApiParamを使用することができます。

@ApiOperation(value = "获取打卡信息", notes = "获取打卡信息") 
@RequestMapping(method = RequestMethod.GET, value = "/{mPhone}/{mPassword}/{date}") 
public @ResponseBody String getSignInfo(
     @ApiParam(value = "手机号", required = true, dataType = "String",defaultValue="13268690268") 
     @PathVariable String mPhone, 
     @ApiParam(value = "密码", required = true, dataType = "String",defaultValue="111111") 
     @PathVariable String mPassword, 
     @ApiParam(value = "日期", required = true, dataType = "String",defaultValue="2017-07-04") 
     @PathVariable String date, 
     HttpSession httpSession) { 
    // ... 
} 
+0

ありがとうございました。 – Arison