gitee.com/woood2/luca@v1.0.4/cmd/backend/docs/swagger.yaml (about) 1 basePath: / 2 definitions: 3 controller.App: 4 properties: 5 appkey: 6 example: weibo 7 type: string 8 contacts: 9 example: '@来去之间' 10 type: string 11 createtime: 12 example: "2006-01-02 15:04:05" 13 type: string 14 disabled: 15 example: 0 16 type: integer 17 id: 18 example: 24 19 type: integer 20 logo: 21 example: https://img.t.sinajs.cn/t6/style/images/apple/wbfont.svg 22 type: string 23 name: 24 example: 新浪微博 25 type: string 26 remark: 27 example: 备注 28 type: string 29 secret: 30 example: wow24^_^ 31 type: string 32 updatetime: 33 example: "2006-01-02 15:04:05" 34 type: string 35 url: 36 example: https://weibo.com 37 type: string 38 type: object 39 controller.ChangeAppDisabledParam: 40 properties: 41 disabled: 42 example: true 43 type: boolean 44 type: object 45 controller.CreateAppParam: 46 properties: 47 appkey: 48 example: weibo 49 type: string 50 contacts: 51 example: '@来去之间' 52 type: string 53 logo: 54 example: https://img.t.sinajs.cn/t6/style/images/apple/wbfont.svg 55 type: string 56 name: 57 example: 新浪微博 58 type: string 59 remark: 60 example: 备注 61 type: string 62 secret: 63 example: wow24^_^ 64 type: string 65 url: 66 example: https://weibo.com 67 type: string 68 required: 69 - appkey 70 - name 71 - secret 72 type: object 73 controller.EditAppParam: 74 properties: 75 contacts: 76 example: '@来去之间' 77 type: string 78 logo: 79 example: https://img.t.sinajs.cn/t6/style/images/apple/wbfont.svg 80 type: string 81 name: 82 example: 新浪微博 83 type: string 84 remark: 85 example: 备注 86 type: string 87 secret: 88 example: wow24^_^ 89 type: string 90 url: 91 example: https://weibo.com 92 type: string 93 required: 94 - name 95 - secret 96 type: object 97 errcode.Resp: 98 properties: 99 data: 100 type: object 101 errCode: 102 type: string 103 errMsg: 104 type: string 105 stack: 106 type: string 107 traceID: 108 type: string 109 type: object 110 info: 111 contact: {} 112 description: 基于Gin封装的demo项目 113 license: {} 114 title: Luca APIs 115 version: "1.0" 116 paths: 117 /apps: 118 get: 119 consumes: 120 - application/json 121 description: 批量获取应用列表,支持模糊查询 122 operationId: list-app 123 parameters: 124 - description: 应用标识 125 in: query 126 name: appkey 127 type: string 128 - description: 应用名称 129 in: query 130 name: name 131 type: string 132 produces: 133 - application/json 134 responses: 135 "200": 136 description: OK 137 schema: 138 allOf: 139 - $ref: '#/definitions/errcode.Resp' 140 - properties: 141 data: 142 items: 143 $ref: '#/definitions/controller.App' 144 type: array 145 type: object 146 "400": 147 description: Bad Request 148 schema: 149 type: string 150 "401": 151 description: Unauthorized 152 schema: 153 type: string 154 "403": 155 description: Forbidden 156 schema: 157 type: string 158 "500": 159 description: Internal Server Error 160 schema: 161 $ref: '#/definitions/errcode.Resp' 162 security: 163 - ApiKeyAuth: [] 164 summary: 应用列表 165 tags: 166 - 应用 167 post: 168 consumes: 169 - application/json 170 description: 创建一个新的应用 171 operationId: create-app 172 parameters: 173 - description: 应用参数 174 in: body 175 name: CreateAppParam 176 required: true 177 schema: 178 $ref: '#/definitions/controller.CreateAppParam' 179 produces: 180 - application/json 181 responses: 182 "200": 183 description: OK 184 schema: 185 allOf: 186 - $ref: '#/definitions/errcode.Resp' 187 - properties: 188 data: 189 $ref: '#/definitions/controller.App' 190 type: object 191 "400": 192 description: Bad Request 193 schema: 194 type: string 195 "401": 196 description: Unauthorized 197 schema: 198 type: string 199 "403": 200 description: Forbidden 201 schema: 202 type: string 203 "500": 204 description: Internal Server Error 205 schema: 206 $ref: '#/definitions/errcode.Resp' 207 security: 208 - ApiKeyAuth: [] 209 summary: 应用创建 210 tags: 211 - 应用 212 /apps/{appkey}: 213 delete: 214 consumes: 215 - application/json 216 description: 删除一个应用 217 operationId: delete-app 218 parameters: 219 - description: 应用标识 220 in: path 221 name: appkey 222 required: true 223 type: string 224 produces: 225 - application/json 226 responses: 227 "200": 228 description: OK 229 schema: 230 allOf: 231 - $ref: '#/definitions/errcode.Resp' 232 - properties: 233 data: 234 type: boolean 235 type: object 236 "401": 237 description: Unauthorized 238 schema: 239 type: string 240 "403": 241 description: Forbidden 242 schema: 243 type: string 244 "500": 245 description: Internal Server Error 246 schema: 247 $ref: '#/definitions/errcode.Resp' 248 security: 249 - ApiKeyAuth: [] 250 summary: 应用删除 251 tags: 252 - 应用 253 get: 254 consumes: 255 - application/json 256 description: 查询单个应用详情 257 operationId: get-app 258 parameters: 259 - description: 应用标识 260 in: path 261 name: appkey 262 required: true 263 type: string 264 produces: 265 - application/json 266 responses: 267 "200": 268 description: OK 269 schema: 270 allOf: 271 - $ref: '#/definitions/errcode.Resp' 272 - properties: 273 data: 274 $ref: '#/definitions/controller.App' 275 type: object 276 "401": 277 description: Unauthorized 278 schema: 279 type: string 280 "403": 281 description: Forbidden 282 schema: 283 type: string 284 "500": 285 description: Internal Server Error 286 schema: 287 $ref: '#/definitions/errcode.Resp' 288 security: 289 - ApiKeyAuth: [] 290 summary: 应用查询 291 tags: 292 - 应用 293 put: 294 consumes: 295 - application/json 296 description: 修改应用的属性 297 operationId: edit-app 298 parameters: 299 - description: 应用标识 300 in: path 301 name: appkey 302 required: true 303 type: string 304 - description: 应用参数 305 in: body 306 name: EditAppParam 307 required: true 308 schema: 309 $ref: '#/definitions/controller.EditAppParam' 310 produces: 311 - application/json 312 responses: 313 "200": 314 description: OK 315 schema: 316 allOf: 317 - $ref: '#/definitions/errcode.Resp' 318 - properties: 319 data: 320 type: boolean 321 type: object 322 "400": 323 description: Bad Request 324 schema: 325 type: string 326 "401": 327 description: Unauthorized 328 schema: 329 type: string 330 "403": 331 description: Forbidden 332 schema: 333 type: string 334 "500": 335 description: Internal Server Error 336 schema: 337 $ref: '#/definitions/errcode.Resp' 338 security: 339 - ApiKeyAuth: [] 340 summary: 应用修改 341 tags: 342 - 应用 343 /apps/{appkey}/disabled: 344 put: 345 consumes: 346 - application/json 347 description: 转变一个应用的状态 348 operationId: change-app-disabled 349 parameters: 350 - description: 应用标识 351 in: path 352 name: appkey 353 required: true 354 type: string 355 - description: 参数 356 in: body 357 name: ChangeAppDisabledParam 358 required: true 359 schema: 360 $ref: '#/definitions/controller.ChangeAppDisabledParam' 361 produces: 362 - application/json 363 responses: 364 "200": 365 description: OK 366 schema: 367 allOf: 368 - $ref: '#/definitions/errcode.Resp' 369 - properties: 370 data: 371 type: boolean 372 type: object 373 "400": 374 description: Bad Request 375 schema: 376 type: string 377 "401": 378 description: Unauthorized 379 schema: 380 type: string 381 "403": 382 description: Forbidden 383 schema: 384 type: string 385 "500": 386 description: Internal Server Error 387 schema: 388 $ref: '#/definitions/errcode.Resp' 389 security: 390 - ApiKeyAuth: [] 391 summary: 应用启用/禁用 392 tags: 393 - 应用 394 securityDefinitions: 395 ApiKeyAuth: 396 in: header 397 name: token 398 type: apiKey 399 swagger: "2.0"