This repository has been archived by the owner on Oct 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathschema.json
135 lines (135 loc) · 3.2 KB
/
schema.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Test title",
"minLength": 10,
"maxLength": 80
},
"extends": {
"type": "array",
"description": "Extension models!",
"items": {
"type": "string"
}
},
"break": {
"type": "boolean",
"description": "Pause/break the test"
},
"method": {
"type": "string",
"enum": ["GET", "POST", "PUT", "PATCH", "DELETE"],
"description": "Request HTTP Verbose Method"
},
"model": {
"type": "string",
"description": "Loopback Model name (plural form)"
},
"url": {
"type": "string",
"description": "Loopback method Name and/or arguments... to call in the model"
},
"skip": {
"type": "boolean",
"description": "Skip the test"
},
"debug": {
"type": "boolean",
"description": "Debug by dumping the request payload, the response body and the current context!"
},
"file": {
"type": "object",
"description": "Allow to upload a given file!",
"properties": {
"path": {
"type": "string",
"description": "File location to be uploded!"
},
"form_name": {
"type": "string",
"maxLength": 40,
"description": "Form name to be sent into the request"
}
},
"required": ["path"],
"additionalProperties": false
},
"headers": {
"description": "Request headers...",
"type": "object"
},
"form": {
"description": "Request form (url-encoded)...",
"type": "object"
},
"formData": {
"description": "Request formData...",
"type": "object"
},
"expect": {
"type": "object",
"description": "Describe how do you expect the response to be!",
"properties": {
"statusCode": {
"description": "Expected response statusCode",
"type": "number"
},
"duration": {
"type": "number",
"description": "Expected baseline execution time in milliseconds of the request"
},
"bodyType": {
"description": "Expected response body Type (JavaScript)",
"type": "string"
},
"headers": {
"description": "All headers key expected, with the value not matched explicitely",
"type": "object"
},
"properties": {
"description": "All body properties expected",
"type": "object",
"patternProperties": {
".*": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": ["type"],
"properties": {
"type": {
"type": "string",
"description": "Expected response body Type (JavaScript)"
},
"value": {
"description": "Property expected value"
}
}
},
{
"type": "string",
"description": "Expected response body Type (JavaScript)"
}
]
}
}
}
},
"additionalProperties": false
},
"variables": {
"type": "array",
"description": "Response body to declare as a variable in the Test context!",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": ["title", "url"]
}
}