@Apiimplicitparam的paramType


轉自:https://swagger.io/docs/specification/describing-parameters/

 

 

Parameter Types

OpenAPI 3.0 distinguishes between the following parameter types based on the parameter location. The location is determined by the parameter’s in key, for example, in: query or in: path.

 

例如:

@ApiOperation(value = "測試借口3", notes = "測試借口3", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "test3", method = RequestMethod.GET)
@ResponseBody
public ResultResponse<String> test3(
@ApiParam(value="顏色") @RequestParam String color
// @ApiParam(value="形狀") @Param("shape") String shapeStr

){
// System.out.println(123121);
// return ResultResponse.success("testResult: " + color + "," + shapeStr);
return ResultResponse.success("testResult: " + color + ",");
}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM