sk-matrix-project/backend/golang/matrix-middle-service/docs/swagger.json

421 lines
14 KiB
JSON
Raw Normal View History

{
"swagger": "2.0",
"info": {
"description": "matrix-middle-service 的 swagger",
"title": "matrix-middle-service API",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Shikong",
"email": "919411476@qq.com"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0"
},
"basePath": "/",
2023-02-27 17:18:31 +08:00
"paths": {
2023-02-28 00:03:02 +08:00
"/bot/type/add": {
"post": {
"description": "添加 bot 类型",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"BotType"
],
"summary": "添加 bot 类型",
"parameters": [
{
"description": "bot 类型",
"name": "vo",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/bottype.AddBotTypeDto"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/resp.Response"
},
{
"type": "object",
"properties": {
"data": {
"type": "boolean"
}
}
}
]
}
},
"default": {
"description": "",
"schema": {
"$ref": "#/definitions/errorx.CodeErrorResponse"
}
}
}
}
},
"/bot/type/del": {
"delete": {
"description": "根据 id 删除 bot 类型",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"BotType"
],
"summary": "删除 bot 类型",
"parameters": [
{
"type": "string",
"description": "bot 类型id",
"name": "id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/resp.Response"
},
{
"type": "object",
"properties": {
"data": {
"type": "boolean"
}
}
}
]
}
},
"default": {
"description": "",
"schema": {
"$ref": "#/definitions/errorx.CodeErrorResponse"
}
}
}
}
},
2023-02-27 17:18:31 +08:00
"/bot/type/list": {
"get": {
"description": "获取 bot 类型列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"BotType"
],
"summary": "获取 bot 类型列表",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/resp.Response"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/model.BotType"
}
}
}
}
]
}
},
"default": {
"description": "",
"schema": {
"$ref": "#/definitions/errorx.CodeErrorResponse"
}
}
}
}
2023-03-14 19:10:45 +08:00
},
2023-03-15 11:34:15 +08:00
"/record/location/get": {
"post": {
"description": "查询定位信息",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Record"
],
"summary": "查询定位信息",
"parameters": [
{
"description": "查询查询定位信息",
"name": "vo",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.GetDto"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/resp.Response"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/model.LocationRecord"
}
}
}
}
]
}
},
"default": {
"description": "",
"schema": {
"$ref": "#/definitions/errorx.CodeErrorResponse"
}
}
}
}
},
2023-03-14 19:10:45 +08:00
"/record/location/post": {
"post": {
"description": "上报定位信息",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Record"
],
"summary": "上报定位信息",
2023-03-15 11:34:15 +08:00
"parameters": [
{
"description": "定位信息",
"name": "vo",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.LocationRecord"
}
}
],
2023-03-14 19:10:45 +08:00
"responses": {
"200": {
"description": "OK",
"schema": {
2023-03-15 11:34:15 +08:00
"allOf": [
{
"$ref": "#/definitions/resp.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.LocationRecord"
}
}
}
]
2023-03-14 19:10:45 +08:00
}
},
"default": {
"description": "",
"schema": {
"$ref": "#/definitions/errorx.CodeErrorResponse"
}
}
}
}
2023-02-27 17:18:31 +08:00
}
},
"definitions": {
2023-02-28 00:03:02 +08:00
"bottype.AddBotTypeDto": {
"type": "object",
"required": [
"active",
"name"
],
"properties": {
"active": {
"description": "是否启用",
"type": "boolean"
},
"name": {
"description": "名称",
"type": "string"
}
}
},
2023-03-15 11:34:15 +08:00
"dto.GetDto": {
"type": "object",
"properties": {
"endTime": {
"type": "string"
},
"startTime": {
"type": "string"
}
}
},
2023-02-27 17:18:31 +08:00
"errorx.CodeErrorResponse": {
"type": "object",
"properties": {
"code": {
2023-02-28 00:03:02 +08:00
"description": "状态码",
2023-02-27 17:18:31 +08:00
"type": "integer",
"example": 200
},
2023-02-28 00:03:02 +08:00
"data": {
"description": "数据"
},
2023-02-27 17:18:31 +08:00
"msg": {
2023-02-28 00:03:02 +08:00
"description": "信息",
2023-02-27 17:18:31 +08:00
"type": "string",
"example": "OK"
}
}
},
"model.BotType": {
"type": "object",
"properties": {
"active": {
"description": "是否启用",
"type": "boolean"
},
"id": {
"description": "id",
"type": "string"
},
"name": {
"description": "名称",
"type": "string"
}
}
},
2023-03-15 11:34:15 +08:00
"model.LocationRecord": {
"type": "object",
"properties": {
"accuracy": {
"type": "number"
},
"adCode": {
"type": "string"
},
"address": {
"type": "string"
},
"altitude": {
"type": "number"
},
"bearing": {
"type": "number"
},
"callbackTime": {
"type": "string"
},
"city": {
"type": "string"
},
"cityCode": {
"type": "string"
},
"country": {
"type": "string"
},
"description": {
"type": "string"
},
"district": {
"type": "string"
},
"id": {
"type": "string"
},
"latitude": {
"type": "number"
},
"locationTime": {
"type": "string"
},
"locationType": {
"type": "integer"
},
"longitude": {
"type": "number"
},
"province": {
"type": "string"
},
"speed": {
"type": "number"
},
"street": {
"type": "string"
},
"streetNumber": {
"type": "string"
}
}
},
2023-02-27 17:18:31 +08:00
"resp.Response": {
"type": "object",
"properties": {
"code": {
2023-02-28 00:03:02 +08:00
"description": "状态码",
2023-02-27 17:18:31 +08:00
"type": "integer",
"example": 200
},
2023-02-28 00:03:02 +08:00
"data": {
"description": "数据"
},
2023-02-27 17:18:31 +08:00
"msg": {
2023-02-28 00:03:02 +08:00
"description": "信息",
2023-02-27 17:18:31 +08:00
"type": "string",
"example": "OK"
}
}
}
}
}