potato/docs/swagger.yaml

425 lines
9.7 KiB
YAML
Raw Normal View History

2019-08-11 15:41:32 +08:00
basePath: /api
2019-08-07 20:56:20 +08:00
info:
contact: {}
description: This is a data_govern use golang
license: {}
title: Potato Api
version: "1.0"
2019-08-11 15:41:32 +08:00
paths:
2019-08-12 21:05:20 +08:00
/v1/auth:
get:
consumes:
- application/json
parameters:
- description: 用户 用户名
in: query
name: username
required: true
type: string
- description: 用户 密码
in: query
name: password
required: true
type: string
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "data" : {"token" : ""}, "msg" : "ok"}'
schema:
type: string
summary: 用户验证
2019-08-11 15:41:32 +08:00
/v1/businesses:
get:
consumes:
- application/json
2019-08-12 21:05:20 +08:00
parameters:
- description: auth by /auth
in: header
name: Authorization
required: true
type: string
2019-08-11 15:41:32 +08:00
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "data" : {}, "msg" : "ok"}'
schema:
type: string
summary: 业务系统列表
tags:
- businesses
post:
consumes:
- multipart/form-data
parameters:
- description: 业务系统 名称
in: formData
name: name
required: true
type: string
- description: 业务系统 描述
in: formData
name: desc
type: string
- description: 业务系统 云端id
in: formData
name: c_id
type: integer
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "msg" : "ok"}'
schema:
type: string
summary: 新增业务系统
tags:
- businesses
/v1/businesses/{id}:
delete:
consumes:
- application/json
parameters:
- description: 业务系统 ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "msg" : "ok"}'
schema:
type: string
summary: 删除业务系统
tags:
- businesses
patch:
consumes:
- multipart/form-data
parameters:
- description: 业务系统 ID
in: path
name: id
required: true
type: integer
- description: 业务系统 名称
in: formData
name: name
type: string
- description: 业务系统 描述
in: formData
name: desc
type: string
- description: 业务系统 云端id
in: formData
name: c_id
type: string
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "msg" : "ok"}'
schema:
type: string
summary: 修改业务系统
tags:
- businesses
/v1/meta_databases:
get:
consumes:
- application/json
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "basic" : {}, "msg": "ok" }'
schema:
type: string
summary: 数据源列表
tags:
- meta_databases
2019-08-12 01:39:17 +08:00
post:
consumes:
- multipart/form-data
parameters:
- description: 数据源 名称
in: formData
name: name
required: true
type: string
- description: 数据源 地址
in: formData
name: host
required: true
type: string
- description: 数据源 端口号
in: formData
name: port
required: true
type: integer
- description: 数据源 数据库名称
in: formData
name: db_name
required: true
type: string
- description: 数据源 用户名
in: formData
name: username
required: true
type: string
- description: 数据源 密码
in: formData
name: password
required: true
type: string
- description: 数据源 备注
in: formData
name: comment
type: string
- description: 系统厂商 id
in: formData
name: vendor_id
required: true
type: integer
- description: 业务系统 id
in: formData
name: business_id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: '{"code": 200, data: {}, "msg" : "ok"}'
schema:
type: string
summary: 新增数据源
tags:
- meta_databases
/v1/meta_databases/{id}:
delete:
consumes:
- application/json
parameters:
- description: 数据源 ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "msg" : "ok"}'
schema:
type: string
summary: 删除数据源
tags:
- meta_databases
patch:
consumes:
- multipart/form-data
parameters:
- description: 数据源 ID
in: path
name: id
required: true
type: integer
- description: 数据源 名称
in: formData
name: name
type: string
- description: 数据源 地址
in: formData
name: host
type: string
- description: 数据源 端口号
in: formData
name: port
type: integer
- description: 数据源 数据库名称
in: formData
name: db_name
type: string
- description: 数据源 用户名
in: formData
name: username
type: string
- description: 数据源 密码
in: formData
name: password
type: string
- description: 数据源 备注
in: formData
name: comment
type: string
- description: 系统厂商 id
in: formData
name: vendor_id
type: integer
- description: 业务系统 id
in: formData
name: business_id
type: integer
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "msg" : "ok"}'
schema:
type: string
summary: 修改数据源
tags:
- meta_databases
2019-08-11 15:41:32 +08:00
/v1/meta_databases/{id}/meta_tables:
get:
consumes:
- application/json
parameters:
- description: 数据源 ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "basic" : {}, "msg": "ok" }'
schema:
type: string
summary: 元数据列表
tags:
- meta_tables
2019-08-12 21:05:20 +08:00
/v1/users:
get:
consumes:
- application/json
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "data" : {}, "msg" : "ok"}'
schema:
type: string
summary: 用户列表
tags:
- users
post:
consumes:
- multipart/form-data
parameters:
- description: 用户 用户名
in: formData
name: username
required: true
type: string
- description: 用户 密码
in: formData
name: password
required: true
type: string
- description: 用户 真实姓名
in: formData
name: nickname
required: true
type: string
produces:
- application/json
responses:
"200":
description: '{"code" : 200, data: {}, "msg" : "ok"}'
schema:
type: string
summary: 新增用户
tags:
- users
2019-08-11 15:41:32 +08:00
/v1/vendors:
get:
consumes:
- application/json
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "data" : {}, "msg" : "ok"}'
schema:
type: string
summary: 系统厂商列表
tags:
- vendors
post:
consumes:
- multipart/form-data
parameters:
- description: 系统厂商 名称
in: formData
name: name
required: true
type: string
- description: 系统厂商 云端id
in: formData
name: c_id
type: integer
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "msg" : "ok"}'
schema:
type: string
summary: 新增系统厂商
tags:
- vendors
/v1/vendors/{id}:
delete:
consumes:
- application/json
parameters:
- description: 系统厂商 ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "msg" : "ok"}'
schema:
type: string
summary: 删除系统厂商
tags:
- vendors
patch:
consumes:
- multipart/form-data
parameters:
- description: 系统厂商 ID
in: path
name: id
required: true
type: integer
- description: 系统厂商 名称
in: formData
name: name
type: string
- description: 系统厂商 云端id
in: formData
name: c_id
type: integer
produces:
- application/json
responses:
"200":
description: '{"code" : 200, "msg" : "ok"}'
schema:
type: string
summary: 修改系统厂商
tags:
- vendors
2019-08-07 20:56:20 +08:00
swagger: "2.0"