-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswagger.json
More file actions
238 lines (238 loc) · 6.46 KB
/
swagger.json
File metadata and controls
238 lines (238 loc) · 6.46 KB
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
{
"swagger": "2.0",
"info": {
"title": "TEST API",
"version": "version not set"
},
"schemes": [
"http",
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/ops/features": {
"get": {
"summary": "GET /ops/features",
"operationId": "ListFeatures",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/featureListFeaturesResponse"
}
}
},
"tags": [
"Generic"
]
}
},
"/ops/features/{uuid}": {
"put": {
"summary": "PUT /ops/features/:uuid",
"operationId": "UpdateFeature",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/featureUpdateFeatureResponse"
}
}
},
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"type": "string",
"format": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protobufStruct"
}
}
],
"tags": [
"Generic"
]
}
}
},
"definitions": {
"featureFeature": {
"type": "object",
"properties": {
"app_id": {
"type": "string",
"format": "string"
},
"args": {
"type": "array",
"items": {
"type": "string",
"format": "string"
}
},
"enabled": {
"type": "boolean",
"format": "boolean"
},
"extra_data": {
"$ref": "#/definitions/protobufStruct",
"title": "extra data can be any json data\nFor parnter(特权专区) feature it shold be\nrepeated PartnerExtra extra_data = 10"
},
"method": {
"$ref": "#/definitions/featureFeatureFetchMethod"
},
"requirements": {
"type": "array",
"items": {
"type": "string",
"format": "string"
}
},
"type": {
"$ref": "#/definitions/featureFeatureType"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"uuid": {
"type": "string",
"format": "string"
}
}
},
"featureFeatureFetchMethod": {
"type": "string",
"enum": [
"UNKNOWN_METHOD",
"GET"
],
"default": "UNKNOWN_METHOD"
},
"featureFeatureType": {
"type": "string",
"enum": [
"UNKNOWN_FEATURE_TYPE",
"URL"
],
"default": "UNKNOWN_FEATURE_TYPE"
},
"featureListFeaturesRequest": {
"type": "object"
},
"featureListFeaturesResponse": {
"type": "object",
"properties": {
"features": {
"type": "array",
"items": {
"$ref": "#/definitions/featureFeature"
}
}
}
},
"featureUpdateFeatureRequest": {
"type": "object",
"properties": {
"extra_data": {
"$ref": "#/definitions/protobufStruct"
},
"token": {
"type": "string",
"format": "string"
},
"uuid": {
"type": "string",
"format": "string"
}
}
},
"featureUpdateFeatureResponse": {
"type": "object",
"properties": {
"feature": {
"$ref": "#/definitions/featureFeature"
}
}
},
"protobufListValue": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufValue"
},
"description": "Repeated field of dynamically typed values."
}
},
"description": "`ListValue` is a wrapper around a repeated field of values.\n\nThe JSON representation for `ListValue` is JSON array."
},
"protobufNullValue": {
"type": "string",
"enum": [
"NULL_VALUE"
],
"default": "NULL_VALUE",
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
},
"protobufStruct": {
"type": "object",
"properties": {
"fields": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/protobufValue"
},
"description": "Unordered map of dynamically typed values."
}
},
"description": "`Struct` represents a structured data value, consisting of fields\nwhich map to dynamically typed values. In some languages, `Struct`\nmight be supported by a native representation. For example, in\nscripting languages like JS a struct is represented as an\nobject. The details of that representation are described together\nwith the proto support for the language.\n\nThe JSON representation for `Struct` is JSON object."
},
"protobufValue": {
"type": "object",
"properties": {
"bool_value": {
"type": "boolean",
"format": "boolean",
"description": "Represents a boolean value."
},
"list_value": {
"$ref": "#/definitions/protobufListValue",
"description": "Represents a repeated `Value`."
},
"null_value": {
"$ref": "#/definitions/protobufNullValue",
"description": "Represents a null value."
},
"number_value": {
"type": "number",
"format": "double",
"description": "Represents a double value."
},
"string_value": {
"type": "string",
"format": "string",
"description": "Represents a string value."
},
"struct_value": {
"$ref": "#/definitions/protobufStruct",
"description": "Represents a structured value."
}
},
"description": "`Value` represents a dynamically typed value which can be either\nnull, a number, a string, a boolean, a recursive struct value, or a\nlist of values. A producer of value is expected to set one of that\nvariants, absence of any variant indicates an error.\n\nThe JSON representation for `Value` is JSON value."
}
}
}