2019-08-11 15:41:32 +08:00
|
|
|
basePath: /api
|
2021-03-24 11:29:15 +08:00
|
|
|
definitions:
|
2021-06-10 22:41:58 +08:00
|
|
|
basic.Vendor:
|
|
|
|
type: object
|
2021-06-10 19:03:15 +08:00
|
|
|
errcode.Error:
|
2021-03-24 11:29:15 +08:00
|
|
|
properties:
|
2021-06-10 19:03:15 +08:00
|
|
|
code:
|
2021-03-24 11:29:15 +08:00
|
|
|
type: integer
|
2021-06-10 19:03:15 +08:00
|
|
|
data:
|
|
|
|
type: object
|
|
|
|
msg:
|
2021-03-24 11:29:15 +08:00
|
|
|
type: string
|
|
|
|
type: object
|
2019-08-07 20:56:20 +08:00
|
|
|
info:
|
|
|
|
contact: {}
|
2021-06-10 19:03:15 +08:00
|
|
|
description: This is a potato use golang
|
2019-08-07 20:56:20 +08:00
|
|
|
title: Potato Api
|
|
|
|
version: "1.0"
|
2019-08-11 15:41:32 +08:00
|
|
|
paths:
|
2021-06-14 21:15:55 +08:00
|
|
|
/auth:
|
2021-03-24 11:29:15 +08:00
|
|
|
post:
|
2019-08-12 21:05:20 +08:00
|
|
|
consumes:
|
2021-06-10 22:41:58 +08:00
|
|
|
- multipart/form-data
|
2019-08-12 21:05:20 +08:00
|
|
|
parameters:
|
2021-06-11 01:24:00 +08:00
|
|
|
- description: app key
|
|
|
|
in: formData
|
|
|
|
name: app_key
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: app secret
|
|
|
|
in: formData
|
|
|
|
name: app_secret
|
2019-08-12 21:05:20 +08:00
|
|
|
required: true
|
2021-06-11 01:24:00 +08:00
|
|
|
type: string
|
2019-08-12 21:05:20 +08:00
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
2021-06-10 22:41:58 +08:00
|
|
|
description: 请求成功
|
2019-08-12 21:05:20 +08:00
|
|
|
schema:
|
2021-06-10 22:41:58 +08:00
|
|
|
$ref: '#/definitions/errcode.Error'
|
2021-06-11 01:24:00 +08:00
|
|
|
summary: 鉴权验证
|
2021-06-11 18:04:58 +08:00
|
|
|
/v1/upload:
|
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- multipart/form-data
|
|
|
|
parameters:
|
|
|
|
- description: auth by /auth
|
|
|
|
in: header
|
|
|
|
name: token
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: 文件
|
|
|
|
in: formData
|
|
|
|
name: file
|
|
|
|
required: true
|
|
|
|
type: file
|
|
|
|
- description: 文件类型
|
|
|
|
in: formData
|
|
|
|
name: type
|
|
|
|
required: true
|
|
|
|
type: integer
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: 请求成功
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/errcode.Error'
|
|
|
|
summary: 上传文件
|
2021-03-24 11:29:15 +08:00
|
|
|
/v1/vendors:
|
2019-08-11 15:41:32 +08:00
|
|
|
get:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
2021-03-23 00:55:26 +08:00
|
|
|
parameters:
|
|
|
|
- description: auth by /auth
|
|
|
|
in: header
|
2021-06-10 22:41:58 +08:00
|
|
|
name: token
|
2021-03-23 00:55:26 +08:00
|
|
|
required: true
|
|
|
|
type: string
|
2021-03-24 11:29:15 +08:00
|
|
|
- description: 页码
|
|
|
|
in: query
|
|
|
|
name: page
|
2019-08-12 01:39:17 +08:00
|
|
|
type: integer
|
2021-03-24 11:29:15 +08:00
|
|
|
- description: 每页数量
|
|
|
|
in: query
|
|
|
|
name: page_size
|
2019-08-11 15:41:32 +08:00
|
|
|
type: integer
|
2021-06-11 01:24:00 +08:00
|
|
|
- description: 系统厂商名称
|
|
|
|
in: query
|
|
|
|
maxLength: 100
|
|
|
|
name: name
|
|
|
|
type: string
|
|
|
|
- description: 系统厂商云id
|
|
|
|
in: query
|
|
|
|
name: uuid
|
|
|
|
type: integer
|
2019-08-11 15:41:32 +08:00
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
2021-06-10 19:03:15 +08:00
|
|
|
description: 请求成功
|
2019-08-11 15:41:32 +08:00
|
|
|
schema:
|
2021-06-10 22:41:58 +08:00
|
|
|
$ref: '#/definitions/basic.Vendor'
|
2019-08-11 15:41:32 +08:00
|
|
|
summary: 系统厂商列表
|
|
|
|
tags:
|
|
|
|
- vendors
|
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- multipart/form-data
|
|
|
|
parameters:
|
2021-03-23 00:55:26 +08:00
|
|
|
- description: auth by /auth
|
|
|
|
in: header
|
2021-06-10 22:41:58 +08:00
|
|
|
name: token
|
2021-03-23 00:55:26 +08:00
|
|
|
required: true
|
|
|
|
type: string
|
2021-06-11 01:24:00 +08:00
|
|
|
- description: 系统厂商名称
|
|
|
|
in: formData
|
|
|
|
maxLength: 100
|
|
|
|
minLength: 1
|
|
|
|
name: name
|
2021-06-10 22:41:58 +08:00
|
|
|
required: true
|
2021-06-11 01:24:00 +08:00
|
|
|
type: string
|
|
|
|
- description: 系统厂商云id
|
|
|
|
in: formData
|
|
|
|
name: uuid
|
|
|
|
type: integer
|
2019-08-11 15:41:32 +08:00
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
2021-06-10 19:03:15 +08:00
|
|
|
description: 请求成功
|
2019-08-11 15:41:32 +08:00
|
|
|
schema:
|
2021-06-10 22:41:58 +08:00
|
|
|
$ref: '#/definitions/basic.Vendor'
|
2019-08-11 15:41:32 +08:00
|
|
|
summary: 新增系统厂商
|
|
|
|
tags:
|
|
|
|
- vendors
|
|
|
|
/v1/vendors/{id}:
|
|
|
|
delete:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
parameters:
|
2021-03-23 00:55:26 +08:00
|
|
|
- description: auth by /auth
|
|
|
|
in: header
|
2021-06-10 22:41:58 +08:00
|
|
|
name: token
|
2021-03-23 00:55:26 +08:00
|
|
|
required: true
|
|
|
|
type: string
|
2019-08-11 15:41:32 +08:00
|
|
|
- description: 系统厂商 ID
|
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: integer
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
2021-06-10 19:03:15 +08:00
|
|
|
description: 请求成功
|
2019-08-11 15:41:32 +08:00
|
|
|
schema:
|
2021-06-10 22:41:58 +08:00
|
|
|
$ref: '#/definitions/basic.Vendor'
|
2019-08-11 15:41:32 +08:00
|
|
|
summary: 删除系统厂商
|
|
|
|
tags:
|
|
|
|
- vendors
|
2021-06-11 01:24:00 +08:00
|
|
|
get:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
parameters:
|
|
|
|
- description: auth by /auth
|
|
|
|
in: header
|
|
|
|
name: token
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: 系统厂商 ID
|
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: integer
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: 请求成功
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/basic.Vendor'
|
|
|
|
summary: 系统厂商
|
|
|
|
tags:
|
|
|
|
- vendors
|
2019-08-11 15:41:32 +08:00
|
|
|
patch:
|
|
|
|
consumes:
|
|
|
|
- multipart/form-data
|
|
|
|
parameters:
|
2021-03-23 00:55:26 +08:00
|
|
|
- description: auth by /auth
|
|
|
|
in: header
|
2021-06-10 22:41:58 +08:00
|
|
|
name: token
|
2021-03-23 00:55:26 +08:00
|
|
|
required: true
|
|
|
|
type: string
|
2019-08-11 15:41:32 +08:00
|
|
|
- description: 系统厂商 ID
|
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: integer
|
2021-06-11 01:24:00 +08:00
|
|
|
- description: 系统厂商名称
|
|
|
|
in: formData
|
|
|
|
maxLength: 100
|
|
|
|
minLength: 1
|
|
|
|
name: name
|
|
|
|
type: string
|
|
|
|
- description: 系统厂商云id
|
|
|
|
in: formData
|
|
|
|
name: uuid
|
|
|
|
type: integer
|
2019-08-11 15:41:32 +08:00
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
2021-06-10 19:03:15 +08:00
|
|
|
description: 请求成功
|
2019-08-11 15:41:32 +08:00
|
|
|
schema:
|
2021-06-10 22:41:58 +08:00
|
|
|
$ref: '#/definitions/basic.Vendor'
|
2019-08-11 15:41:32 +08:00
|
|
|
summary: 修改系统厂商
|
|
|
|
tags:
|
|
|
|
- vendors
|
2019-08-07 20:56:20 +08:00
|
|
|
swagger: "2.0"
|