222 lines
4.8 KiB
YAML
222 lines
4.8 KiB
YAML
basePath: /api
|
|
definitions:
|
|
basic.Vendor:
|
|
type: object
|
|
errcode.Error:
|
|
properties:
|
|
code:
|
|
type: integer
|
|
data:
|
|
type: object
|
|
msg:
|
|
type: string
|
|
type: object
|
|
info:
|
|
contact: {}
|
|
description: This is a potato use golang
|
|
title: Potato Api
|
|
version: "1.0"
|
|
paths:
|
|
/auth:
|
|
post:
|
|
consumes:
|
|
- multipart/form-data
|
|
parameters:
|
|
- description: app key
|
|
in: formData
|
|
name: app_key
|
|
required: true
|
|
type: string
|
|
- description: app secret
|
|
in: formData
|
|
name: app_secret
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: 请求成功
|
|
schema:
|
|
$ref: '#/definitions/errcode.Error'
|
|
summary: 鉴权验证
|
|
/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: 上传文件
|
|
/v1/vendors:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: auth by /auth
|
|
in: header
|
|
name: token
|
|
required: true
|
|
type: string
|
|
- description: 页码
|
|
in: query
|
|
name: page
|
|
type: integer
|
|
- description: 每页数量
|
|
in: query
|
|
name: page_size
|
|
type: integer
|
|
- description: 系统厂商名称
|
|
in: query
|
|
maxLength: 100
|
|
name: name
|
|
type: string
|
|
- description: 系统厂商云id
|
|
in: query
|
|
name: uuid
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: 请求成功
|
|
schema:
|
|
$ref: '#/definitions/basic.Vendor'
|
|
summary: 系统厂商列表
|
|
tags:
|
|
- vendors
|
|
post:
|
|
consumes:
|
|
- multipart/form-data
|
|
parameters:
|
|
- description: auth by /auth
|
|
in: header
|
|
name: token
|
|
required: true
|
|
type: string
|
|
- description: 系统厂商名称
|
|
in: formData
|
|
maxLength: 100
|
|
minLength: 1
|
|
name: name
|
|
required: true
|
|
type: string
|
|
- description: 系统厂商云id
|
|
in: formData
|
|
name: uuid
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: 请求成功
|
|
schema:
|
|
$ref: '#/definitions/basic.Vendor'
|
|
summary: 新增系统厂商
|
|
tags:
|
|
- vendors
|
|
/v1/vendors/{id}:
|
|
delete:
|
|
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
|
|
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
|
|
patch:
|
|
consumes:
|
|
- multipart/form-data
|
|
parameters:
|
|
- description: auth by /auth
|
|
in: header
|
|
name: token
|
|
required: true
|
|
type: string
|
|
- description: 系统厂商 ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
- description: 系统厂商名称
|
|
in: formData
|
|
maxLength: 100
|
|
minLength: 1
|
|
name: name
|
|
type: string
|
|
- description: 系统厂商云id
|
|
in: formData
|
|
name: uuid
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: 请求成功
|
|
schema:
|
|
$ref: '#/definitions/basic.Vendor'
|
|
summary: 修改系统厂商
|
|
tags:
|
|
- vendors
|
|
swagger: "2.0"
|