Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 116 additions & 1 deletion todo-app/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ paths:
API 서버가 잘 작동하는지 확인하는 용도의 API.
responses:
'200':
description: 멀쩡함.
description: 서버가 정상 작동함
/tasks:
get:
tags:
Expand Down Expand Up @@ -52,3 +52,118 @@ paths:
type: string
description: 할 일 등록 일시 (UTC)
example: "2024-10-01 12:34:56"
post:
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
contents:
type: string
description: 내용
example: "오늘 할 일"
responses:
200:
description: Task 저장 결과
content:
application/json:
schema:
type: object
properties:
id:
type: number
description: 저장 된 id 값
example: 1
contents:
type: string
description: 내용
example: "오늘 할 일"
400:
description: 잘못된 입력 형식
content:
application/json:
schema:
type: object
properties:
error:
type: string
example: "문자열 타입이 아닙니다."
/tasks/{taskId}:
get:
parameters:
- name: taskId
in: path
required: true
schema:
type: string
responses:
200:
description: Task 목록 조회
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
patch:
parameters:
- name: taskId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
contents:
type: string
description: 내용
example: "내일 할 일"
responses:
200:
description: Task 수정 결과
content:
application/json:
schema:
type: object
properties:
id:
type: number
description: 저장 된 id 값
example: 1
contents:
type: string
description: 내용
example: "내일 할 일"
delete:
parameters:
- name: taskId
in: path
required: true
schema:
type: string
responses:
200:
description: Task 삭제 결과
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: 삭제 성공
example: "success"
components:
schemas:
Task:
type: object
properties:
id:
type: integer
content:
type: string