게시글 댓글
1. 게시글에 대한 댓글 등록
1.1. 성공 201
http-request
POST /articles/1/comments HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: AccessToken
Content-Length: 54
Host: localhost:8080
{
"content" : "유효한 댓글내용입니다."
}http-response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 400
[ {
"commentId" : 1,
"articleId" : 1,
"answerId" : null,
"content" : "냥냐냥냐",
"userInfo" : {
"userId" : 1,
"nickname" : "NICKNAME",
"grade" : "GOLD"
},
"avatar" : {
"avatarId" : 1,
"filename" : "FILENAME",
"remotePath" : "FILEPATH"
},
"createdAt" : "2022-12-04T00:03:06.6914157",
"lastModifiedAt" : "2022-12-04T00:03:06.6914157"
} ]response-body
[].userInfo.userId
Number
유저 식별자입니다
[].userInfo.nickname
String
유저 닉네임입니다
[].userInfo.grade
String
유저 등급입니다
[].avatar.avatarId
Number
프로필사진 식별자입니다
[].avatar.filename
String
파일 이름입니다
[].avatar.remotePath
String
유저 닉네임입니다
[].articleId
Number
글 식별자입니다
[].answerId
Null
비어있는 답글 식별자입니다
[].content
String
댓글 내용입니다
[].commentId
Number
댓글 식별자입니다
[].createdAt
String
댓글 첫 작성일입니다.
[].lastModifiedAt
String
댓글 최신 수정일입니다
2. 실패 400
http-request
http-response
content
Null
댓글이 비어 있으므로 등록될 수 없습니다.
Authorization
access token
response-body
3. 게시글에 대한 댓글 수정
http-response
request-body
content
String
댓글 내용
Authorization
access token
response-body
[]
Array
응답 데이터
[].userInfo.userId
Number
유저 식별자입니다
[].userInfo.nickname
String
유저 닉네임입니다
[].userInfo.grade
String
유저 등급입니다
[].avatar.avatarId
Number
프로필사진 식별자입니다
[].avatar.filename
String
파일 이름입니다
[].avatar.remotePath
String
유저 닉네임입니다
[].articleId
Number
글 식별자입니다
[].answerId
Null
비어있는 답글 식별자입니다
[].content
String
댓글 내용입니다
[].commentId
Number
댓글 식별자입니다
[].createdAt
String
댓글 첫 작성일입니다.
[].lastModifiedAt
String
댓글 최신 수정일입니다
http-response
request-body
content
String
댓글 내용
Authorization
권한 없는 사용자의 access token
response-body
4. 게시글에 대한 댓글 삭제
4.1. 성공 200
http-request
http-response
4.2. 실패 409
http-request
content
String
댓글 내용
http-response
5. 게시글에 대한 댓글 조회
5.1. 성공 200
http-request
content
String
댓글 내용
http-response
5.2. 실패 409
http-request
content
String
댓글 내용
http-response
Last updated
Was this helpful?