이야기의 댓글 생성
Develop Env
Develop Env
POST
/apis/v1/posts/{postId}/comments
Request
Path Params
postId
string
required
Example:
00000000-0000-0000-0000-200000000000
Body Params application/json
content
string
required
Example
{
"content": "Postman으로 만든 댓글"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:9050/apis/v1/posts/00000000-0000-0000-0000-200000000000/comments' \
--header 'Content-Type: application/json' \
--data-raw '{
"content": "Postman으로 만든 댓글"
}'
Responses
🟢201🟢 댓글 생성 성공
application/json
Body
toast
object (Toast)
required
title
string
required
description
string
required
payload
object
required
id
string
required
createdAt
string
required
Default:
CURRENT_TIMESTAMP
updatedAt
string
required
deletedAt
string | null
optional
content
string
required
userId
string
required
postId
string
required
user
object
required
Example
{
"toast": {
"title": "댓글 작성 완료",
"description": "댓글을 작성했습니다."
},
"payload": {
"id": "79f2f717-37e6-4871-8a7c-85cad8375882",
"createdAt": "2025-01-12T01:23:54.665Z",
"updatedAt": "2025-01-12T01:23:54.665Z",
"deletedAt": null,
"content": "Postman으로 만든 댓글",
"userId": "00000000-0000-0000-0000-000000000000",
"postId": "00000000-0000-0000-0000-200000000000",
"user": {
"id": "00000000-0000-0000-0000-000000000000",
"nickname": "개발자",
"imagePath": null
},
"reactions": []
}
}
🟠400🔴 유효성 검사 실패
🟠403🔴 권한없음
🟠404🔴 존재하지 않음
Modified at 2025-01-14 08:58:36