Skip to content

Commit fc6977b

Browse files
Continue fix swagger definition at display.yaml.
1 parent b4f6281 commit fc6977b

File tree

4 files changed

+95
-86
lines changed

4 files changed

+95
-86
lines changed

package-lock.json

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"main": "src/index.js",
66
"scripts": {
77
"start": "nodemon src/index.js",
8-
"update-deps": "npx npm-check-updates -u && npm install",
9-
"test": "echo \"Error: no test specified\" && exit 1"
8+
"update-deps": "npx npm-check-updates -u && npm install"
109
},
1110
"keywords": [
1211
"capstone-project",

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const swaggerOptions = {
2424
servers: [
2525
{
2626
url: "http://localhost:4000/",
27-
description: "Localhost"
27+
description: "Development"
2828
},
2929
{
3030
url: "https://trackscan.azurewebsites.net/",

src/swagger/display.yaml

Lines changed: 93 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,59 @@
11
/display/coins-and-tokens/reducing:
2-
get:
3-
summary: Get top 10 reducing coins and tokens
4-
tags:
5-
- Coin - Token
6-
responses:
7-
200:
8-
description: Get top 10 reducing coins and tokens successfully
9-
# 400: description: Get top 10 reducing coins and tokens failed
2+
get:
3+
summary: Get top 10 reducing coins and tokens
4+
tags:
5+
- Coin - Token
6+
responses:
7+
200:
8+
description: Get top 10 reducing coins and tokens successfully
9+
400:
10+
description: Get top 10 reducing coins and tokens failed
1011

1112
/display/coins-and-tokens/all:
12-
get:
13-
summary: Get list of coins
14-
tags:
15-
- Coin - Token
16-
responses:
17-
200:
18-
description: Get list of coins successfully
19-
# 400: description: Get list of coins failed
13+
get:
14+
summary: Get list of coins
15+
tags:
16+
- Coin - Token
17+
responses:
18+
200:
19+
description: Get list of coins successfully
20+
400:
21+
description: Get list of coins failed
2022

2123
/display/coins/trending:
22-
get:
23-
summary: Get top 10 trending coins
24-
tags:
25-
- Coin - Token
26-
responses:
27-
200:
28-
description: Get top 10 trending coins successfully
29-
# 400: description: Get top 10 trending coins failed
24+
get:
25+
summary: Get top 10 trending coins
26+
tags:
27+
- Coin - Token
28+
responses:
29+
200:
30+
description: Get top 10 trending coins successfully
31+
400:
32+
description: Get top 10 trending coins failed
3033

3134
/display/tokens/trending:
32-
get:
33-
summary: Get top 10 trending tokens
34-
tags:
35-
- Coin - Token
36-
responses:
37-
200:
38-
description: Get top 10 trending tokens successfully
39-
# 400: description: Get top 10 trending tokens failed
35+
get:
36+
summary: Get top 10 trending tokens
37+
tags:
38+
- Coin - Token
39+
responses:
40+
200:
41+
description: Get top 10 trending tokens successfully
42+
400:
43+
description: Get top 10 trending tokens failed
4044

4145
/display/coin/details:
42-
get:
43-
summary: Get coin or token details
44-
tags:
45-
- Coin - Token
46-
parameters:
47-
- in: query
48-
name: symbol
49-
schema:
50-
type: string
51-
responses:
52-
200:
53-
description: Get coin or token details successfully
54-
# 400: description: Get coin or token details failed
46+
get:
47+
summary: Get coin or token details
48+
tags:
49+
- Coin - Token
50+
responses:
51+
200:
52+
description: Get coin or token details successfully
53+
400:
54+
description: Get coin or token details failed
5555

56+
# Error
5657
/display/sharks:
5758
get:
5859
summary: Get list of sharks
@@ -66,8 +67,10 @@
6667
responses:
6768
200:
6869
description: Get list of sharks successfully
69-
# 400: description: Get list of sharks failed
70+
400:
71+
description: Get list of sharks failed
7072

73+
# Error
7174
/display/sharks/transaction-history/page-length:
7275
post:
7376
summary: Get length of list transactions
@@ -88,8 +91,10 @@
8891
responses:
8992
200:
9093
description: Get length of list transactions successfully
91-
# 400: description: Get length of list transactions failed
94+
400:
95+
description: Get length of list transactions failed
9296

97+
# Error
9398
/display/sharks/transaction-history:
9499
post:
95100
summary: Get list transactions history of all sharks
@@ -114,8 +119,10 @@
114119
responses:
115120
200:
116121
description: Get list transactions history of all sharks successfully
117-
# 400: description: Get list transactions history of all sharks failed
122+
400:
123+
description: Get list transactions history of all sharks failed
118124

125+
# Error
119126
/display/shark/crypto:
120127
get:
121128
summary: Get list of coin and token of shark
@@ -129,8 +136,10 @@
129136
responses:
130137
200:
131138
description: Get list of coin and token of shark successful
132-
# 400: description: Get list of coin and token of shark failed
139+
400:
140+
description: Get list of coin and token of shark failed
133141

142+
# Error
134143
/display/shark/transaction-history:
135144
get:
136145
summary: Get transaction history of shark
@@ -144,8 +153,10 @@
144153
responses:
145154
200:
146155
description: Get transaction history of shark successful
147-
# 400: description: Get transaction history of shark failed
156+
400:
157+
description: Get transaction history of shark failed
148158

159+
# Error
149160
/display/shark/trade-transaction-history:
150161
get:
151162
summary: Get trade coin transaction history
@@ -163,8 +174,10 @@
163174
responses:
164175
200:
165176
description: Get trade coin transaction history successful
166-
# 400: description: Get trade coin transaction history failed
177+
400:
178+
description: Get trade coin transaction history failed
167179

180+
# Error?
168181
/display/sharks/length:
169182
get:
170183
summary: Get length of sharks list
@@ -173,8 +186,10 @@
173186
responses:
174187
200:
175188
description: Get length of sharks list successful
176-
# 400: description: Get length of sharks list failed
189+
400:
190+
description: Get length of sharks list failed
177191

192+
# Error?
178193
/display/sharks/transaction-history/length:
179194
get:
180195
summary: Get length of transactions list
@@ -183,8 +198,10 @@
183198
responses:
184199
200:
185200
description: Get length of transactions list successful
186-
# 400: description: Get length of transactions list failed
201+
400:
202+
description: Get length of transactions list failed
187203

204+
# Error
188205
/display/sharks/gain-loss:
189206
get:
190207
summary: Get list gain and loss of sharks
@@ -198,8 +215,10 @@
198215
responses:
199216
200:
200217
description: Get list gain and loss of sharks successfully
201-
# 400: description: Get list gain and loss of sharks failed
218+
400:
219+
description: Get list gain and loss of sharks failed
202220

221+
# Error
203222
/display/coins/gain-loss:
204223
get:
205224
summary: Get list gain and loss of coins
@@ -213,24 +232,27 @@
213232
responses:
214233
200:
215234
description: Get list gain and loss of coins successfully
216-
# 400: description: Get list gain and loss of coins failed
235+
400:
236+
description: Get list gain and loss of coins failed
217237

218238
/display/users/length:
219-
get:
220-
summary: Get length of users list
221-
tags:
222-
- User
223-
responses:
224-
200:
225-
description: Get length of users list successful
226-
# 400: description: Get length of users list failed
239+
get:
240+
summary: Get length of users list
241+
tags:
242+
- User
243+
responses:
244+
200:
245+
description: Get length of users list successfully
246+
400:
247+
description: Get length of users list failed
227248

228249
/display/tags:
229-
get:
230-
summary: Get list of tags
231-
tags:
232-
- Others
233-
responses:
234-
200:
235-
description: Get list of tags successfully
236-
# 400: description: Get list of tags failed
250+
get:
251+
summary: Get list of tags list
252+
tags:
253+
- Others
254+
responses:
255+
200:
256+
description: Get list of tags list successfully
257+
400:
258+
description: Get list of tags list failed

0 commit comments

Comments
 (0)