292 lines
9.0 KiB
JSON
292 lines
9.0 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "CBTC测试服务.",
|
|
"title": "CBTC测试系统API",
|
|
"contact": {},
|
|
"version": "1.0"
|
|
},
|
|
"host": "localhost:8080",
|
|
"basePath": "/",
|
|
"paths": {
|
|
"/api/v1/drafting/paging": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"JwtAuth": []
|
|
}
|
|
],
|
|
"description": "可以通过草稿名称过滤,分页查询草稿",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"用户Api"
|
|
],
|
|
"summary": "分页查询草稿",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"example": 1,
|
|
"description": "页码",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"example": 10,
|
|
"description": "页面行数",
|
|
"name": "size",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.PageDto"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.ErrorDto"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.ErrorDto"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.ErrorDto"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/login": {
|
|
"post": {
|
|
"description": "用户登录",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"用户Api"
|
|
],
|
|
"summary": "用户登录",
|
|
"parameters": [
|
|
{
|
|
"description": "登录信息",
|
|
"name": "loginInfo",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.LoginDto"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.TokenRespDto"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.ErrorDto"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/paging": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"JwtAuth": []
|
|
}
|
|
],
|
|
"description": "可以通过用户名称过滤,分页查询用户",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"用户Api"
|
|
],
|
|
"summary": "分页查询用户",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "手机号",
|
|
"name": "mobile",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "用户名",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"example": 1,
|
|
"description": "页码",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"example": 10,
|
|
"description": "页面行数",
|
|
"name": "size",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.PageDto"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.ErrorDto"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.ErrorDto"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.ErrorDto"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"dto.ErrorDto": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dto.LoginDto": {
|
|
"type": "object",
|
|
"required": [
|
|
"account",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"account": {
|
|
"description": "账号",
|
|
"type": "string",
|
|
"example": "17791995809"
|
|
},
|
|
"password": {
|
|
"description": "加密密码",
|
|
"type": "string",
|
|
"example": "95129dbaace576e46f41a629e6f35d5c"
|
|
}
|
|
}
|
|
},
|
|
"dto.OrderItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"asc": {
|
|
"type": "boolean"
|
|
},
|
|
"column": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dto.PageDto": {
|
|
"type": "object",
|
|
"required": [
|
|
"page",
|
|
"size"
|
|
],
|
|
"properties": {
|
|
"orders": {
|
|
"description": "排序项",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/dto.OrderItem"
|
|
}
|
|
},
|
|
"page": {
|
|
"description": "页码",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"records": {},
|
|
"size": {
|
|
"description": "页面行数",
|
|
"type": "integer",
|
|
"example": 10
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"dto.TokenRespDto": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer"
|
|
},
|
|
"expire": {
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"JwtAuth": {
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
} |