-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.json
120 lines (120 loc) · 3.11 KB
/
swagger.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
"openapi": "3.0.0",
"info": {
"title": "Node API 文檔",
"version": "1.0.0",
"description": "一個示例 API 文檔"
},
"components": {
"schemas": {
"Todo": {
"type": "object",
"required": [
"title"
],
"properties": {
"id": {
"type": "integer",
"description": "The auto-generated id of the todo."
},
"title": {
"type": "string",
"description": "The title of the todo."
}
},
"example": {
"id": 1,
"title": "Buy groceries"
}
}
}
},
"paths": {
"/": {
"get": {
"summary": "根目錄歡迎頁面",
"responses": {
"200": {
"description": "歡迎訊息",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/health": {
"get": {
"summary": "健康檢查和運行時間",
"responses": {
"200": {
"description": "健康檢查資訊",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"uptime": {
"type": "number",
"description": "The uptime of the server in seconds."
},
"message": {
"type": "string",
"description": "OK"
},
"timestamp": {
"type": "number",
"description": "The current time in milliseconds."
}
}
}
}
}
}
}
}
},
"/api/todos": {
"get": {
"summary": "獲取所有待辦事項",
"responses": {
"200": {
"description": "待辦事項列表",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Todo"
}
}
}
}
}
}
}
},
"/api/todos/{id}": {
"get": {
"summary": "獲取特定待辦事項",
"parameters": [
{
"in": "path",
"name": "id",
"schema": {
"type": "integer",
"required": true
},
"description": "The todo id"
}
],
"responses": {
"200": {
"description": "特定待辦事項",
"content": {
"application/json": {
"schema": {