{ "swagger": "2.0", "info": { "description": "Video Course框架 API 文档", "title": "Video Course框架", "termsOfService": "http://swagger.io/terms/", "contact": { "name": "API Support", "url": "http://www.swagger.io/support", "email": "support@swagger.io" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0" }, "basePath": "/v1", "paths": { "/Auth/GenVerifyPic": { "post": { "description": "获取验证图片和验证id", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "获取验证图片", "parameters": [ { "type": "string", "description": "高", "name": "height", "in": "formData", "required": true }, { "type": "string", "description": "宽", "name": "width", "in": "formData", "required": true }, { "type": "string", "description": "噪点数量", "name": "noiseCount", "in": "formData", "required": true }, { "type": "string", "description": "验证码字数", "name": "length", "in": "formData", "required": true }, { "type": "string", "description": "验证码取值范围 比如 1234567890 或者 abcdef等", "name": "source", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.ResponseVerifyPic" } } } } }, "/Auth/GetPhoneVFCode": { "post": { "description": "手机获取验证码", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "手机获取验证码", "parameters": [ { "type": "string", "description": "手机号", "name": "phone", "in": "formData", "required": true }, { "type": "integer", "description": "验证码类型 1:登录", "name": "codeType", "in": "formData", "required": true }, { "type": "string", "description": "图形验证码id", "name": "picId", "in": "formData", "required": true }, { "type": "string", "description": "图形验证码", "name": "picCode", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.ResponseBase" } } } } }, "/Auth/PhoneSignIn": { "post": { "description": "手机验证码登录", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "手机验证码登录", "parameters": [ { "type": "string", "description": "手机号", "name": "phone", "in": "formData", "required": true }, { "type": "integer", "description": "验证码", "name": "smsCode", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.ResponseBase" } } } } }, "/Test/UserAdd": { "post": { "description": "会员用户添加", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "Test" ], "summary": "会员用户添加", "parameters": [ { "type": "string", "description": "姓名", "name": "name", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.ResponseBase" } } } } }, "/Test/UserListQuery": { "post": { "description": "会员用户查询", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "Test" ], "summary": "会员用户查询", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.UserList" } } } } }, "/User/UserSelfQuery": { "post": { "description": "会员信息查询", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "会员信息查询", "parameters": [ { "type": "string", "description": "Token", "name": "token", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.ResponseBase" } } } } } }, "definitions": { "controller.ResponseBase": { "type": "object", "properties": { "code": { "type": "integer" }, "memo": { "type": "string" } } }, "controller.ResponseVerifyPic": { "type": "object", "properties": { "id": { "type": "string" }, "pic": { "type": "string" } } }, "controller.UserList": { "type": "object", "properties": { "code": { "type": "integer" }, "memo": { "type": "string" }, "rs": { "type": "array", "items": { "type": "object" } } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" }, "BasicAuth": { "type": "basic" }, "OAuth2AccessCode": { "type": "oauth2", "flow": "accessCode", "authorizationUrl": "https://example.com/oauth/authorize", "tokenUrl": "https://example.com/oauth/token", "scopes": { "admin": " Grants read and write access to administrative information" } }, "OAuth2Application": { "type": "oauth2", "flow": "application", "tokenUrl": "https://example.com/oauth/token", "scopes": { "admin": " Grants read and write access to administrative information", "write": " Grants write access" } }, "OAuth2Implicit": { "type": "oauth2", "flow": "implicit", "authorizationUrl": "https://example.com/oauth/authorize", "scopes": { "admin": " Grants read and write access to administrative information", "write": " Grants write access" } }, "OAuth2Password": { "type": "oauth2", "flow": "password", "tokenUrl": "https://example.com/oauth/token", "scopes": { "admin": " Grants read and write access to administrative information", "read": " Grants read access", "write": " Grants write access" } } } }