{ "swagger": "2.0", "info": { "title": "mini-chat 接口文档", "contact": {}, "version": "v0.0.1" }, "basePath": "/", "paths": { "/admin/login": { "post": { "description": "管理员登录", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "管理端.登录" ], "summary": "管理员登录", "parameters": [ { "description": "请求参数", "name": "RequestBody", "in": "body", "required": true, "schema": { "$ref": "#/definitions/admin.loginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/admin.loginResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/code.Failure" } } } } } }, "definitions": { "admin.loginRequest": { "type": "object", "required": [ "password", "username" ], "properties": { "password": { "description": "密码 (MD5加密后的密码)", "type": "string" }, "username": { "description": "用户名", "type": "string" } } }, "admin.loginResponse": { "type": "object", "properties": { "token": { "description": "登录成功后颁发的 Token", "type": "string" } } }, "code.Failure": { "type": "object", "properties": { "code": { "description": "业务码", "type": "integer" }, "message": { "description": "描述信息", "type": "string" } } } }, "securityDefinitions": { "LoginVerifyToken": { "type": "apiKey", "name": "Authorization", "in": "header" } } }