|
4 | 4 | "post": { |
5 | 5 | "summary": "채팅방 생성", |
6 | 6 | "description": "consumerId, artistId, requestId로 채팅방을 생성합니다.", |
| 7 | + "security": [ |
| 8 | + { |
| 9 | + "bearerAuth": [] |
| 10 | + } |
| 11 | + ], |
7 | 12 | "tags": ["Chat"], |
8 | 13 | "requestBody": { |
9 | 14 | "required": true, |
|
45 | 50 | } |
46 | 51 | }, |
47 | 52 | "404": { |
48 | | - "description": "사용자, 작가, 요청 중 하나를 찾을 수 없음" |
| 53 | + "description": "사용자를 찾을 수 없음", |
| 54 | + "content": { |
| 55 | + "application/json": { |
| 56 | + "schema": { |
| 57 | + "type": "object", |
| 58 | + "properties": { |
| 59 | + "resultType": { "type": "string", "example": "FAIL" }, |
| 60 | + "error": { |
| 61 | + "type": "object", |
| 62 | + "properties": { |
| 63 | + "errorCode": { "type": "string", "example": "U001" }, |
| 64 | + "reason": { "type": "string", "example": "사용자 id를 찾을 수 없습니다." }, |
| 65 | + "data": { "type": "object" } |
| 66 | + } |
| 67 | + }, |
| 68 | + "success": { "type": "object", "nullable": true, "example": null } |
| 69 | + } |
| 70 | + } |
| 71 | + } |
| 72 | + } |
49 | 73 | } |
50 | 74 | } |
51 | 75 | } |
52 | 76 | }, |
53 | | - "/api/chatrooms/{consumerId}": { |
| 77 | + "/api/chatrooms/list": { |
54 | 78 | "get": { |
55 | | - "summary": "사용자 ID로 채팅방 목록 조회", |
56 | | - "description": "사용자 ID를 바탕으로 해당 사용자가 참여한 채팅방 목록을 조회합니다.", |
57 | | - "tags": ["Chat"], |
58 | | - "parameters": [ |
| 79 | + "summary": "채팅방 목록 조회", |
| 80 | + "description": "사용자가 참여한 채팅방 목록을 조회합니다.", |
| 81 | + "security": [ |
59 | 82 | { |
60 | | - "name": "consumerId", |
61 | | - "in": "path", |
62 | | - "required": true, |
63 | | - "schema": { |
64 | | - "type": "string", |
65 | | - "example": "1" |
66 | | - }, |
67 | | - "description": "조회할 사용자의 ID" |
| 83 | + "bearerAuth": [] |
68 | 84 | } |
69 | 85 | ], |
| 86 | + "tags": ["Chat"], |
| 87 | + "parameters": [], |
70 | 88 | "responses": { |
71 | 89 | "200": { |
72 | 90 | "description": "채팅방 목록 조회 성공", |
|
132 | 150 | "delete": { |
133 | 151 | "summary": "채팅방 소프트 삭제 (hidden 처리) 및 조건부 하드 삭제", |
134 | 152 | "description": "사용자가 선택한 채팅방들을 hidden 처리 후, hiddenUser와 hiddenArtist가 모두 true인 경우 DB에서 삭제합니다.", |
| 153 | + "security": [ |
| 154 | + { |
| 155 | + "bearerAuth": [] |
| 156 | + } |
| 157 | + ], |
135 | 158 | "tags": ["Chat"], |
136 | 159 | "requestBody": { |
137 | 160 | "required": true, |
|
163 | 186 | "description": "삭제 처리 완료 (내용 없음)" |
164 | 187 | }, |
165 | 188 | "400": { |
166 | | - "description": "잘못된 요청 파라미터" |
| 189 | + "description": "잘못된 요청 파라미터", |
| 190 | + "content": { |
| 191 | + "application/json": { |
| 192 | + "schema": { |
| 193 | + "type": "object", |
| 194 | + "properties": { |
| 195 | + "resultType": { "type": "string", "example": "FAIL" }, |
| 196 | + "error": { |
| 197 | + "type": "object", |
| 198 | + "properties": { |
| 199 | + "errorCode": { "type": "string", "example": "C001" }, |
| 200 | + "reason": { "type": "string", "example": "userType은 'consumer' 또는 'artist'여야 합니다." }, |
| 201 | + "data": { "type": "object", "example": {} } |
| 202 | + } |
| 203 | + }, |
| 204 | + "success": { |
| 205 | + "type": ["object", "null"], |
| 206 | + "example": null |
| 207 | + } |
| 208 | + } |
| 209 | + } |
| 210 | + } |
| 211 | + } |
167 | 212 | }, |
168 | 213 | "404": { |
169 | | - "description": "채팅방을 찾을 수 없음" |
| 214 | + "description": "채팅방을 찾을 수 없음", |
| 215 | + "content": { |
| 216 | + "application/json": { |
| 217 | + "schema": { |
| 218 | + "type": "object", |
| 219 | + "properties": { |
| 220 | + "resultType": { "type": "string", "example": "FAIL" }, |
| 221 | + "error": { |
| 222 | + "type": "object", |
| 223 | + "properties": { |
| 224 | + "errorCode": { "type": "string", "example": "C002" }, |
| 225 | + "reason": { "type": "string", "example": "요청한 채팅방을 찾을 수 없습니다." }, |
| 226 | + "data": { "type": "object", "example": { "chatroomIds": [999] } } |
| 227 | + } |
| 228 | + }, |
| 229 | + "success": { |
| 230 | + "type": ["object", "null"], |
| 231 | + "example": null |
| 232 | + } |
| 233 | + } |
| 234 | + } |
| 235 | + } |
| 236 | + } |
170 | 237 | } |
171 | 238 | } |
172 | 239 | } |
173 | 240 | }, |
174 | 241 | "/api/chatrooms/{chatroomId}/messages": { |
175 | 242 | "get": { |
176 | 243 | "summary": "채팅방 메시지 조회", |
177 | | - "description": "채팅방 ID를 기반으로 해당 채팅방의 메시지를 조회합니다. 무한 스크롤을 위해 cursor(이전 페이지 마지막 메시지 id)와 limit을 query로 받습니다.", |
| 244 | + "description": "해당 채팅방의 메시지를 조회합니다. 무한 스크롤을 위해 cursor(이전 페이지 마지막 메시지 id)와 limit을 query로 받습니다.", |
| 245 | + "security": [ |
| 246 | + { |
| 247 | + "bearerAuth": [] |
| 248 | + } |
| 249 | + ], |
178 | 250 | "tags": ["Chat"], |
179 | 251 | "parameters": [ |
180 | 252 | { |
|
277 | 349 | } |
278 | 350 | }, |
279 | 351 | "404": { |
280 | | - "description": "채팅방을 찾을 수 없음" |
| 352 | + "description": "채팅방을 찾을 수 없음", |
| 353 | + "content": { |
| 354 | + "application/json": { |
| 355 | + "schema": { |
| 356 | + "type": "object", |
| 357 | + "properties": { |
| 358 | + "resultType": { "type": "string", "example": "FAIL" }, |
| 359 | + "error": { |
| 360 | + "type": "object", |
| 361 | + "properties": { |
| 362 | + "errorCode": { "type": "string", "example": "C002" }, |
| 363 | + "reason": { "type": "string", "example": "요청한 채팅방을 찾을 수 없습니다." }, |
| 364 | + "data": { |
| 365 | + "type": "object", |
| 366 | + "example": { "chatroomIds": [999] } |
| 367 | + } |
| 368 | + } |
| 369 | + }, |
| 370 | + "success": { |
| 371 | + "type": ["object", "null"], |
| 372 | + "example": null |
| 373 | + } |
| 374 | + } |
| 375 | + } |
| 376 | + } |
| 377 | + } |
281 | 378 | }, |
282 | 379 | "500": { |
283 | | - "description": "서버 오류" |
| 380 | + "description": "서버 오류", |
| 381 | + "content": { |
| 382 | + "application/json": { |
| 383 | + "schema": { |
| 384 | + "type": "object", |
| 385 | + "properties": { |
| 386 | + "resultType": { "type": "string", "example": "FAIL" }, |
| 387 | + "error": { |
| 388 | + "type": "object", |
| 389 | + "properties": { |
| 390 | + "errorCode": { "type": "string", "example": "S001" }, |
| 391 | + "reason": { "type": "string", "example": "알 수 없는 서버 오류가 발생했습니다." }, |
| 392 | + "data": { "type": "object", "example": {} } |
| 393 | + } |
| 394 | + }, |
| 395 | + "success": { |
| 396 | + "type": ["object", "null"], |
| 397 | + "example": null |
| 398 | + } |
| 399 | + } |
| 400 | + } |
| 401 | + } |
| 402 | + } |
284 | 403 | } |
285 | 404 | } |
286 | 405 | } |
|
289 | 408 | "get": { |
290 | 409 | "summary": "메시지 키워드 검색", |
291 | 410 | "description": "키워드가 포함된 메시지를 검색하여 반환합니다.", |
| 411 | + "security": [ |
| 412 | + { |
| 413 | + "bearerAuth": [] |
| 414 | + } |
| 415 | + ], |
292 | 416 | "tags": ["Chat"], |
293 | 417 | "parameters": [ |
294 | 418 | { |
|
361 | 485 | } |
362 | 486 | }, |
363 | 487 | "400": { |
364 | | - "description": "잘못된 요청" |
| 488 | + "description": "잘못된 요청", |
| 489 | + "content": { |
| 490 | + "application/json": { |
| 491 | + "schema": { |
| 492 | + "type": "object", |
| 493 | + "properties": { |
| 494 | + "resultType": { "type": "string", "example": "FAIL" }, |
| 495 | + "error": { |
| 496 | + "type": "object", |
| 497 | + "properties": { |
| 498 | + "errorCode": { "type": "string", "example": "R001" }, |
| 499 | + "reason": { "type": "string", "example": "keyword 쿼리 파라미터는 필수입니다." }, |
| 500 | + "data": { "type": "object", "example": {} } |
| 501 | + } |
| 502 | + }, |
| 503 | + "success": { |
| 504 | + "type": ["object", "null"], |
| 505 | + "example": null |
| 506 | + } |
| 507 | + } |
| 508 | + } |
| 509 | + } |
| 510 | + } |
365 | 511 | }, |
366 | 512 | "500": { |
367 | | - "description": "서버 오류" |
| 513 | + "description": "서버 오류", |
| 514 | + "content": { |
| 515 | + "application/json": { |
| 516 | + "schema": { |
| 517 | + "type": "object", |
| 518 | + "properties": { |
| 519 | + "resultType": { "type": "string", "example": "FAIL" }, |
| 520 | + "error": { |
| 521 | + "type": "object", |
| 522 | + "properties": { |
| 523 | + "errorCode": { "type": "string", "example": "S001" }, |
| 524 | + "reason": { "type": "string", "example": "알 수 없는 서버 오류가 발생했습니다." }, |
| 525 | + "data": { "type": "object", "example": {} } |
| 526 | + } |
| 527 | + }, |
| 528 | + "success": { |
| 529 | + "type": ["object", "null"], |
| 530 | + "example": null |
| 531 | + } |
| 532 | + } |
| 533 | + } |
| 534 | + } |
| 535 | + } |
368 | 536 | } |
369 | 537 | } |
370 | 538 | } |
|
0 commit comments