commit 784bc1cd7edbdaa05ca97ff06d6471f9f085f29c
parent 9533ce7b2d12b2e20bfa008440f76bbe20493b26
Author: Yongbin Kim <iam@yongbin.kim>
Date: Tue, 31 Jan 2023 11:54:43 +0900
docs: 일부 API 문서 추가
Signed-off-by: Yongbin Kim <iam@yongbin.kim>
Diffstat:
M | docs/openapi.yaml | | | 76 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- |
1 file changed, 75 insertions(+), 1 deletion(-)
diff --git a/docs/openapi.yaml b/docs/openapi.yaml
@@ -58,7 +58,6 @@ paths:
description: 이메일이 올바르지 않거나 비밀번호가 올바르지 않음.
404:
description: 사용자를 찾을 수 없음.
-
/api/auth/refresh:
post:
description: 리프레시 토큰을 사용해 토큰을 갱신함.
@@ -79,6 +78,81 @@ paths:
401:
description: 리프레시 토큰이 올바르지 않아 사용자를 인증하지 못함.
+ /api/talks/{slug}/{...path}:
+ post:
+ description: 새 토론 스레드를 만듦.
+ parameters:
+ - name: slug
+ in: path
+ description: 위키의 슬러그
+ required: true
+ schema:
+ type: string
+ - name: path
+ in: path
+ description: 문서의 경로
+ required: true
+ schema:
+ type: string
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ title:
+ type: string
+ content:
+ type: string
+ example: |
+ {"title": "Foo", "content": "Hello, World!"}
+ responses:
+ 200:
+ description: 토론 스레드가 성공적으로 생성됨.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ thread:
+ type: integer
+ format: int32
+ 401:
+ description: 인증되지 않음.
+ 404:
+ description: 위키나 문서를 찾을 수 없음.
+
+ /api/threads/{id}/comments:
+ post:
+ description: 새 댓글을 작성함.
+ parameters:
+ - name: id
+ in: path
+ description: 토론 스레드의 ID
+ required: true
+ schema:
+ type: integer
+ format: int32
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ content:
+ type: string
+ example: |
+ {"content": "Hello, World!"}
+ responses:
+ 200:
+ description: 댓글이 성공적으로 작성됨.
+ 401:
+ description: 인증되지 않음.
+ 404:
+ description: 토론 스레드를 찾을 수 없음.
+
/api/users/me:
get:
description: 현재 로그인 된 사용자의 정보를 조회함.