Created
September 19, 2017 09:17
-
-
Save hooklife/0a6f393a705698517df5b880a71e46c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"swagger": "3.0", | |
"info": { | |
"description": "金服项目接口 授权 bearerey J0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEwMDEyMTU1NTEsImlzcyI6Imh0dHA6Ly9qaW5mdWFwaS5kZXYvYXBpL3YxL2xvZ2luIiwiaWF0IjoxNTA1ODA3MjAzLCJleHAiOjE1MDU4MTA4MDMsIm5iZiI6MTUwNTgwNzIwMywianRpIjoiZVpMQ21wR3pnNFg3ejQ3TCJ9.qPy4ZOkb9vKVwwCGAzh6ypw6kl7AJNMi7ICrTX-8MSg", | |
"version": "1.0.0", | |
"title": "金服项目接口" | |
}, | |
"host": "jinfuapi.dev", | |
"basePath": "/api/v1", | |
"schemes": [ | |
"http" | |
], | |
"paths": { | |
"/login": { | |
"post": { | |
"tags": [ | |
"登录" | |
], | |
"summary": "登录", | |
"operationId": "login", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"in": "query", | |
"name": "phone", | |
"description": "手机号 长度11位", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"in": "query", | |
"name": "password", | |
"description": "密码 长度6~12位", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "登录成功" | |
}, | |
"401": { | |
"description": "用户密码错误:user_password_error" | |
}, | |
"404": { | |
"description": "用户不存在:user_not_found" | |
}, | |
"422": { | |
"description": "表单值有误:invalid_payload" | |
} | |
} | |
} | |
}, | |
"/logout": { | |
"get": { | |
"tags": [ | |
"登录" | |
], | |
"summary": "登出", | |
"operationId": "loginout", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": null, | |
"responses": { | |
"200": { | |
"description": "登出成功" | |
} | |
} | |
} | |
}, | |
"/reg/captcha/{phone}": { | |
"get": { | |
"tags": [ | |
"注册" | |
], | |
"summary": "获取注册验证码", | |
"operationId": "regCaptcha", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "phone", | |
"description": "手机号 长度11位", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "验证码发送成功" | |
}, | |
"422": { | |
"description": "表单值有误:invalid_payload" | |
}, | |
"500": { | |
"description": "验证码发送失败:send_sms_error" | |
} | |
} | |
} | |
}, | |
"/reg": { | |
"post": { | |
"tags": [ | |
"注册" | |
], | |
"summary": "注册", | |
"operationId": "reg", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"in": "query", | |
"name": "phone", | |
"description": "手机号 长度11位", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"in": "query", | |
"name": "password", | |
"description": "密码 长度6~12位", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"in": "query", | |
"name": "captcha", | |
"description": "验证码 长度6位", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "注册成功" | |
}, | |
"403": { | |
"description": "短信验证码错误:sms_captcha_error" | |
}, | |
"422": { | |
"description": "表单值有误:invalid_payload" | |
} | |
} | |
} | |
}, | |
"/find_pwd/captcha/{phone}": { | |
"get": { | |
"tags": [ | |
"找回密码" | |
], | |
"summary": "找回密码验证码", | |
"operationId": "findPwdCaptcha", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "phone", | |
"description": "手机号 长度11位", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "验证码发送成功" | |
}, | |
"422": { | |
"description": "传入值有误:invalid_payload" | |
}, | |
"500": { | |
"description": "验证码发送失败:send_sms_error" | |
} | |
} | |
} | |
}, | |
"/find_pwd/check_captcha": { | |
"post": { | |
"tags": [ | |
"找回密码" | |
], | |
"summary": "检查验证码正确性", | |
"operationId": "findPwdCheckCaptcha", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"in": "query", | |
"name": "phone", | |
"description": "手机号 长度11位", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"in": "query", | |
"name": "captcha", | |
"description": "验证码长度6位", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "验证成功" | |
}, | |
"403": { | |
"description": "短信验证码错误:sms_captcha_error" | |
}, | |
"422": { | |
"description": "传入值有误:invalid_payload" | |
} | |
} | |
} | |
}, | |
"/find_pwd/rest_password": { | |
"put": { | |
"tags": [ | |
"找回密码" | |
], | |
"summary": "重置密码", | |
"operationId": "findPwdRestPassword", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"in": "query", | |
"name": "phone", | |
"description": "手机号 长度11位", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"in": "query", | |
"name": "password", | |
"description": "要改更改的密码 长度6~12位" | |
}, | |
{ | |
"in": "query", | |
"name": "captcha", | |
"description": "验证码长度6位", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "验证成功" | |
}, | |
"403": { | |
"description": "短信验证码错误:sms_captcha_error" | |
}, | |
"422": { | |
"description": "传入值有误:invalid_payload" | |
} | |
} | |
} | |
}, | |
"/article": { | |
"get": { | |
"tags": [ | |
"发现" | |
], | |
"summary": "获取文章", | |
"operationId": "listArticle", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"in": "query", | |
"name": "category_id", | |
"description": "默认为0 分类ID-7:媒体报道8:网站公告", | |
"type": "integer" | |
} | |
], | |
"responses": { | |
"200": { | |
"schema": { | |
"type": "array", | |
"properties": { | |
"articles": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Article" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/index": { | |
"get": { | |
"tags": [ | |
"首页" | |
], | |
"summary": "首页", | |
"operationId": "index", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"responses": { | |
"200": { | |
"schema": { | |
"type": "array", | |
"properties": { | |
"banners": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Banner" | |
} | |
}, | |
"lends": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Lend" | |
} | |
}, | |
"total_trading_money": { | |
"type": "string", | |
"description": "累计成交额" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/lend/index": { | |
"get": { | |
"tags": [ | |
"出借" | |
], | |
"summary": "出借", | |
"operationId": "lendIndex", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"responses": { | |
"200": null | |
} | |
} | |
} | |
}, | |
"securityDefinitions": { | |
"Bearer": { | |
"type": "apiKey", | |
"name": "Authorization", | |
"in": "header" | |
} | |
}, | |
"definitions": { | |
"Article": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int64" | |
}, | |
"link": { | |
"type": "string", | |
"description": "链接" | |
}, | |
"title": { | |
"type": "string", | |
"description": "标题" | |
}, | |
"author": { | |
"type": "string", | |
"description": "作者" | |
}, | |
"thumb": { | |
"type": "string", | |
"description": "缩略图" | |
} | |
} | |
}, | |
"Banner": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int64" | |
}, | |
"link": { | |
"type": "string", | |
"description": "点击链接" | |
}, | |
"title": { | |
"type": "string", | |
"description": "标题" | |
}, | |
"url": { | |
"type": "string", | |
"description": "图片链接" | |
}, | |
"desc": { | |
"type": "string", | |
"description": "描述" | |
} | |
} | |
}, | |
"Lend": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int64" | |
}, | |
"title": { | |
"type": "string", | |
"description": "标题" | |
}, | |
"interest": { | |
"type": "string", | |
"description": "预计年化收益" | |
}, | |
"deadline": { | |
"type": "string", | |
"description": "项目期限 例如 1 2 3 4 5" | |
}, | |
"deadline_unit": { | |
"type": "string", | |
"description": "项目期限单位 例如 个月 个年" | |
}, | |
"remaining_money": { | |
"type": "string", | |
"description": "剩余钱数" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment