{ "swagger": "2.0", "info": { "contact": {} }, "basePath": "/htapi", "paths": { "/auth/login": { "post": { "tags": [ "auth" ], "summary": "小程序用户登录", "description": "用户通过微信小程序登录\n\u003cbr\u003e", "parameters": [ { "in": "body", "name": "code", "description": "获取微信小程序code", "required": true, "schema": { "type": "string" }, "type": "string" } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/controllers.BaseResponse" } } } } }, "/auth/sendCode": { "post": { "tags": [ "auth" ], "summary": "获取手机验证码", "description": "用户发送手机验证码\n\u003cbr\u003e", "parameters": [ { "in": "body", "name": "mobile", "description": "小程序手机验证码接口", "required": true, "schema": { "$ref": "#/definitions/SmsCodeReq" } } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/controllers.BaseResponse" } } } } }, "/user/": { "get": { "tags": [ "user" ], "description": "get all Users\n\u003cbr\u003e", "operationId": "UserController.GetAll", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/models.User" } } } } } }, "definitions": { "SmsCodeReq": { "title": "SmsCodeReq", "type": "object" }, "controllers.BaseResponse": { "title": "BaseResponse", "type": "object", "properties": { "Data": { "$ref": "#/definitions/controllers.interface" }, "ErrCode": { "type": "integer", "format": "int64" }, "ErrMsg": { "type": "string" }, "Msg": { "type": "string" }, "Ret": { "description": "返回状态码", "type": "integer", "format": "int64" }, "Success": { "description": "true 执行成功,false 执行失败", "type": "boolean" } } }, "controllers.interface": { "title": "interface", "type": "object" }, "gorm.DeletedAt": { "title": "DeletedAt", "type": "object" }, "gorm.Model": { "title": "Model", "type": "object", "properties": { "CreatedAt": { "type": "string", "format": "datetime" }, "DeletedAt": { "$ref": "#/definitions/gorm.DeletedAt" }, "ID": { "type": "integer", "format": "int32" }, "UpdatedAt": { "type": "string", "format": "datetime" } } }, "models.User": { "title": "User", "type": "object", "properties": { "Gender": { "type": "string" }, "Mobile": { "type": "string" }, "NickName": { "type": "string" }, "OpenId": { "type": "string" }, "Password": { "type": "string" }, "Username": { "type": "string" } } } }, "tags": [ { "name": "user", "description": "Operations about Users\n" } ] }