forked from SchemaStore/schemastore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
case_schema.json
129 lines (129 loc) · 2.83 KB
/
case_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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/case_schema.json",
"definitions": {
"request_body": {
"type": "object"
},
"provider_data": {
"type": "object",
"description": "api or sql return data for later use",
"properties": {
"provider_type": {
"type": "string",
"default": "sql"
},
"provider_db": {
"type": "string"
},
"api_id": {
"type": "string"
},
"provider_sql": {
"type": "string"
},
"request_body": {
"$ref": "#/definitions/request_body"
}
}
},
"provider_datas": {
"type": "array",
"items": {
"$ref": "#/definitions/provider_data"
}
},
"ready_data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"default": "sql"
},
"content": {
"type": "string"
}
}
}
},
"properties": {
"api": {
"title": "api url info",
"type": "object",
"properties": {
"host": {
"type": "string",
"default": "https://dev-api.qiandao.cn"
},
"uri": {
"type": "string"
},
"method": {
"type": "string"
},
"header": {
"type": "string"
}
}
},
"template": {
"title": "set up data for all request",
"type": "object",
"properties": {
"headers": {
"type": "object",
"properties": {
"authorization": {
"type": "string"
}
}
},
"request_body": {
"$ref": "#/definitions/request_body"
},
"provider_data": {
"$ref": "#/definitions/provider_datas"
}
}
},
"cases": {
"title": "cases to test",
"type": "array",
"items": {
"type": "object",
"properties": {
"case_id": {
"type": "string"
},
"sleep": {
"type": "integer",
"description": "sleep after the case execution"
},
"describe": {
"type": "string"
},
"assert": {
"type": "object"
},
"request_body": {
"$ref": "#/definitions/request_body"
},
"provider_data": {
"$ref": "#/definitions/provider_datas"
},
"set_up": {
"$ref": "#/definitions/ready_data",
"type": "object"
},
"tear_down": {
"$ref": "#/definitions/ready_data",
"type": "object"
}
}
}
}
},
"description": "a schema for auto api cases",
"title": "case",
"type": "object"
}