Skip to content

Commit 1b27fa2

Browse files
committed
new output format
1 parent 91fbe71 commit 1b27fa2

File tree

4 files changed

+212
-339
lines changed

4 files changed

+212
-339
lines changed

exampleConfig.json

Lines changed: 52 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,65 @@
77
"input": {
88
"method": "text"
99
},
10-
"code": 200,
11-
"output": "text",
12-
"errorCode": 500,
13-
"errorMessage": "Internal Server Error"
10+
"output": {
11+
"headers": {
12+
"Content-Type": "application/json"
13+
},
14+
"code": 201,
15+
"response": "Created"
16+
},
17+
"description": "This server handles POST requests and returns a JSON response indicating creation."
1418
},
1519
{
16-
"name": "get-server-1",
17-
"method": "GET",
18-
"port": 3001,
20+
"name": "post-server",
21+
"method": "POST",
22+
"port": 3000,
1923
"path": "/test",
20-
"input": null,
21-
"code": 200,
22-
"output": "text"
24+
"input": {
25+
"method": "text2"
26+
},
27+
"output": {
28+
"headers": {
29+
"Content-Type": "application/json"
30+
},
31+
"code": 201,
32+
"response": "Created"
33+
},
34+
"description": "This server handles POST requests and returns a JSON response indicating creation."
2335
},
2436
{
25-
"name": "get-server-2",
26-
"method": ["GET"],
27-
"port": 3002,
28-
"path": "/test",
29-
"input": {},
30-
"code": 201,
31-
"output": "text"
37+
"name": "post-server",
38+
"method": "POST",
39+
"port": 3000,
40+
"path": "/test1",
41+
"input": {
42+
"payload": {
43+
"name": "John Doe",
44+
"age": 30
45+
}
46+
},
47+
"output": {
48+
"headers": {
49+
"Content-Type": "application/json"
50+
},
51+
"filePath": "src/index.json"
52+
},
53+
"description": "This server handles POST requests and returns a JSON response indicating creation."
3254
},
33-
{
34-
"name": "patch-server-3",
35-
"method": ["PATCH", "PUT"],
36-
"port": 3003,
37-
"path": "/test",
55+
{
56+
"name": "post-server",
57+
"method": "POST",
58+
"port": 3000,
59+
"path": "/test1",
3860
"input": {
39-
"method": "json"
61+
"filePath": "src/index.json"
62+
},
63+
"output": {
64+
"headers": {
65+
"Content-Type": "application/json"
66+
},
67+
"filePath": "src/index.json"
4068
},
41-
"code": 201,
42-
"output": "Updated",
43-
"errorCode": 500,
44-
"errorMessage": "Internal Server Error"
69+
"description": "This server handles POST requests and returns a JSON response indicating creation."
4570
}
4671
]

package-lock.json

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

0 commit comments

Comments
 (0)