potato/docs/swagger.json

643 lines
21 KiB
JSON
Raw Normal View History

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