답변 댓글

1. 답변에 대한 댓글 등록

1.1. 성공 201

http-request

POST /answers/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.5942109",
  "lastModifiedAt" : "2022-12-04T00:03:06.5952119"
} ]

response-body

Path
Type
Description

[].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

Path
Type
Description

content

Null

댓글이 비어 있으므로 등록될 수 없습니다.

Name
Description

Authorization

access token

response-body

3. 답변에 대한 댓글 수정

3.1. 성공 200

http-request

http-response

request-body

Path
Type
Description

content

String

댓글 내용

Name
Description

Authorization

access token

response-body

Path
Type
Description

[]

Array

응답 데이터

[].userInfo.userId

Number

유저 식별자입니다

[].userInfo.nickname

String

유저 닉네임입니다

[].userInfo.grade

String

유저 등급입니다

[].avatar.avatarId

Number

프로필사진 식별자입니다

[].avatar.filename

String

파일 이름입니다

[].avatar.remotePath

String

유저 닉네임입니다

[].articleId

Null

비어있는 글 식별자입니다

[].answerId

Number

답글 식별자입니다

[].content

String

댓글 내용입니다

[].commentId

Number

댓글 식별자입니다

[].createdAt

String

댓글 첫 작성일입니다.

[].lastModifiedAt

String

댓글 최신 수정일입니다

4. 답변에 대한 댓글 삭제

4.1. 성공 200

http-request

http-response

4.2. 실패 409

http-request

Path
Type
Description

content

String

댓글 내용

http-response

5. 답변에 대한 댓글 조회

5.1. 성공 200

http-request

Path
Type
Description

content

String

댓글 내용

http-response

5.2. 실패 409

http-request

Path
Type
Description

content

String

댓글 내용

http-response

Last updated

Was this helpful?