basePath: /api definitions: errcode.Error: properties: code: type: integer data: type: object msg: type: string type: object v1.AuthRequest: properties: password: type: string username: type: string required: - password - username type: object v1.RegisterRequest: properties: nickname: type: string password: type: string username: type: string required: - password - username type: object info: contact: {} description: This is a potato use golang title: Potato Api version: "1.0" paths: /v1/auth: post: consumes: - application/json parameters: - description: 用户名,密码 in: body name: data required: true schema: $ref: '#/definitions/v1.AuthRequest' produces: - application/json responses: "200": description: '{"code" : 200, "data" : {"token" : ""}, "msg" : "ok"}' schema: type: string summary: 用户验证 /v1/register: post: consumes: - application/json parameters: - description: 用户名 in: body name: data required: true schema: $ref: '#/definitions/v1.RegisterRequest' produces: - application/json responses: "200": description: '{"success":true,"data":{},"msg":"创建成功"}' schema: type: string summary: 注册用户 /v1/vendors: get: consumes: - application/json parameters: - description: auth by /auth in: header name: Authorization required: true type: string - description: 名称 in: query maxLength: 100 name: name type: string - description: 页码 in: query name: page type: integer - description: 每页数量 in: query name: page_size type: integer produces: - application/json responses: "200": description: 请求成功 schema: $ref: '#/definitions/errcode.Error' "400": description: 请求错误 schema: $ref: '#/definitions/errcode.Error' "500": description: 内部错误 schema: $ref: '#/definitions/errcode.Error' summary: 系统厂商列表 tags: - vendors post: consumes: - multipart/form-data parameters: - description: auth by /auth in: header name: Authorization required: true type: string produces: - application/json responses: "200": description: 请求成功 schema: $ref: '#/definitions/errcode.Error' "400": description: 请求错误 schema: $ref: '#/definitions/errcode.Error' "500": description: 内部错误 schema: $ref: '#/definitions/errcode.Error' summary: 新增系统厂商 tags: - vendors /v1/vendors/{id}: delete: consumes: - application/json parameters: - description: auth by /auth in: header name: Authorization required: true type: string - description: 系统厂商 ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: 请求成功 schema: $ref: '#/definitions/errcode.Error' "400": description: 请求错误 schema: $ref: '#/definitions/errcode.Error' "500": description: 内部错误 schema: $ref: '#/definitions/errcode.Error' summary: 删除系统厂商 tags: - vendors patch: consumes: - multipart/form-data parameters: - description: auth by /auth in: header name: Authorization required: true type: string - description: 系统厂商 ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: 请求成功 schema: $ref: '#/definitions/errcode.Error' "400": description: 请求错误 schema: $ref: '#/definitions/errcode.Error' "500": description: 内部错误 schema: $ref: '#/definitions/errcode.Error' summary: 修改系统厂商 tags: - vendors swagger: "2.0"