forked from acquia/apidoc-openapi-3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
116 lines (116 loc) · 4.56 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
{
"swagger": "3.0",
"info": {
"title": "",
"version": "0.0.0",
"description": ""
},
"paths": {
"/test_api": {
"post": {
"tags": ["search"],
"summary": "test_api_name",
"description": "desc_test_api",
"consumes": ["application/json"],
"produces": ["application/json"],
"parameters": [{
"type": "string",
"in": "query",
"name": "bar",
"description": "desc_bar",
"required": true,
"default": "bar"
}, {
"type": "string",
"in": "header",
"name": "taz",
"description": "desc_taz",
"required": false
}, {
"in": "body",
"schema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "request_desc",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"data": {
"type": "object",
"properties": {
"keyInExtraExample": {
"type": "number"
}
}
},
"foo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"foz": {
"type": "string",
"description": "desc_foo.foz"
}
},
"required": ["foz"]
}
},
"tar": {
"type": "number",
"description": "desc_tar"
}
},
"required": ["foo"]
},
"description": "request_desc"
}],
"responses": {
"200": {
"schema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "response_desc",
"type": "object",
"properties": {
"code": {
"type": "number",
"description": "desc_override_code",
"default": "1"
},
"data": {
"type": "object",
"properties": {
"keyInExample": {
"type": "number"
},
"keyInDoc": {
"type": "number",
"description": "desc_add_extra_data_key_in_doc"
}
},
"required": ["keyInDoc"]
}
},
"required": ["data"]
},
"description": "response_desc"
},
"300": {
"schema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error_desc",
"type": "object",
"properties": {
"bazInJs": {
"type": "string"
}
}
},
"description": "error_desc"
}
}
}
}
}
}