Swagerの簡単な理解
SwagerもRestDocsと同様によく使われるAPIドキュメント化ツールです.
よく使うが欠点もある生産コードは、文書化のためのコードと混合される. 操作コード解析困難 メンテナンスが悪い RestDocsのように、テストを行わなくてもドキュメント化されるため、api検証を自動的に行うことはできません. Spring Rest APIドキュメントをSwaggerにする
よく使うが欠点もある
@ApiOperation(value = "해당 게시판 조회") // documentation을 위한 annotation
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "게시판 고유키", required = true, dataType = "string", paramType = "path", defaultValue = ""),
})
@RequestMapping(value = "/board/{id}", method = RequestMethod.GET)
public ResultJson selectOneBoard(@PathVariable("id") Integer id) {
ResultJson resultJson = new ResultJson();
resultJson.setObject(boardService.selectOneBoard(id));
resultJson.setResultCode(ResultCodeType.SUCCESS.getCode());
resultJson.setMsg(ResultCodeType.SUCCESS.getMsg());
return resultJson;
}
ソース
Reference
この問題について(Swagerの簡単な理解), 我々は、より多くの情報をここで見つけました https://velog.io/@jummi10/Swaggerテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol