Skip to content

Commit

Permalink
chore: swagger 문서 update
Browse files Browse the repository at this point in the history
  • Loading branch information
megymj committed Oct 19, 2023
1 parent dc60288 commit ceb94e1
Showing 1 changed file with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,32 @@
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@ApiResponse(responseCode = "400", description = """
투자 성향이 LION(공격투자형), SNAKE(적극투자형), MONKEY(위험중립형), SHEEP(안정추구형) 외에 다른 값이 들어온 경우,
1. 사용자의 닉네임이 DB에 존재하지 않는 경우 -> example1
즉, 존재하지 않는 투자 성향이 입력된 경우
2. 게시글 번호가 잘못 입력된 경우, 혹은 존재하지 않는 경우 -> example2
""",
content = @Content(schema = @Schema(implementation = SuccessApiResponse.class),
examples = @ExampleObject(name = "example",
description = "투자 성향이 잘못 입력된 경우 예시",
examples = {@ExampleObject(name = "example1",
description = "사용자의 닉네임이 DB에 존재하지 않는 경우 예시",
value = """
{
"code": 400,
"message": "잘못된 투자 성향 형식이 입력되었습니다",
"data": null
}
"code": 400,
"message": "가입된 사용자의 정보가 존재하지 않습니다",
"data": null
}
"""
)))
),
@ExampleObject(name = "example2",
description = "게시글 번호가 잘못 입력된 경우, 혹은 존재하지 않는 경우 예시",
value = """
{
"code": 400,
"message": "요청하신 게시글 id가 존재하지 않습니다.",
"data": null
}
"""
)}
))
public @interface save_BAD_REQUEST {
}

0 comments on commit ceb94e1

Please sign in to comment.