蛋蛋星球-客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

269 line
8.2 KiB

  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "APP客户端-Api接口",
  5. "title": "蛋蛋星球-APP客户端",
  6. "termsOfService": "http://swagger.io/terms/",
  7. "contact": {
  8. "name": "dengbiao",
  9. "url": "http://www.swagger.io/support",
  10. "email": "1239118001@qq.com"
  11. },
  12. "license": {
  13. "name": "Apache 2.0",
  14. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  15. },
  16. "version": "1.0"
  17. },
  18. "host": "mp.xbkai.com",
  19. "basePath": "/api",
  20. "paths": {
  21. "/api/comm/getOssUrl": {
  22. "get": {
  23. "description": "上传许可链接(获取)",
  24. "consumes": [
  25. "application/json"
  26. ],
  27. "produces": [
  28. "application/json"
  29. ],
  30. "tags": [
  31. "对象存储"
  32. ],
  33. "summary": "通用请求-对象存储-上传许可链接(获取)",
  34. "parameters": [
  35. {
  36. "type": "string",
  37. "description": "验证参数Bearer和token空格拼接",
  38. "name": "Authorization",
  39. "in": "header",
  40. "required": true
  41. }
  42. ],
  43. "responses": {
  44. "200": {
  45. "description": "许可链接",
  46. "schema": {
  47. "type": "string"
  48. }
  49. },
  50. "400": {
  51. "description": "具体错误",
  52. "schema": {
  53. "$ref": "#/definitions/md.Response"
  54. }
  55. }
  56. }
  57. }
  58. },
  59. "/api/demo": {
  60. "post": {
  61. "description": "Demo样例测试",
  62. "consumes": [
  63. "application/json"
  64. ],
  65. "produces": [
  66. "application/json"
  67. ],
  68. "tags": [
  69. "Demo"
  70. ],
  71. "summary": "Demo测试",
  72. "parameters": [
  73. {
  74. "description": "用户名密码",
  75. "name": "req",
  76. "in": "body",
  77. "required": true,
  78. "schema": {}
  79. }
  80. ],
  81. "responses": {
  82. "200": {
  83. "description": "token",
  84. "schema": {
  85. "type": "object",
  86. "additionalProperties": true
  87. }
  88. },
  89. "400": {
  90. "description": "具体错误",
  91. "schema": {
  92. "$ref": "#/definitions/md.Response"
  93. }
  94. }
  95. }
  96. }
  97. },
  98. "/v1/login": {
  99. "post": {
  100. "description": "登入",
  101. "consumes": [
  102. "application/json"
  103. ],
  104. "produces": [
  105. "application/json"
  106. ],
  107. "tags": [
  108. "登录"
  109. ],
  110. "summary": "登陆",
  111. "parameters": [
  112. {
  113. "description": "用户名密码",
  114. "name": "req",
  115. "in": "body",
  116. "required": true,
  117. "schema": {
  118. "$ref": "#/definitions/md.LoginReq"
  119. }
  120. }
  121. ],
  122. "responses": {
  123. "200": {
  124. "description": "token",
  125. "schema": {
  126. "$ref": "#/definitions/md.LoginResponse"
  127. }
  128. },
  129. "400": {
  130. "description": "具体错误",
  131. "schema": {
  132. "$ref": "#/definitions/md.Response"
  133. }
  134. }
  135. }
  136. }
  137. },
  138. "/v1/register": {
  139. "post": {
  140. "description": "注册",
  141. "consumes": [
  142. "application/json"
  143. ],
  144. "produces": [
  145. "application/json"
  146. ],
  147. "tags": [
  148. "注册"
  149. ],
  150. "summary": "注册",
  151. "parameters": [
  152. {
  153. "description": "注册参数",
  154. "name": "req",
  155. "in": "body",
  156. "required": true,
  157. "schema": {
  158. "$ref": "#/definitions/md.RegisterReq"
  159. }
  160. }
  161. ],
  162. "responses": {
  163. "200": {
  164. "description": "登录成功返回",
  165. "schema": {
  166. "$ref": "#/definitions/md.LoginResponse"
  167. }
  168. },
  169. "400": {
  170. "description": "具体错误",
  171. "schema": {
  172. "$ref": "#/definitions/md.Response"
  173. }
  174. }
  175. }
  176. }
  177. }
  178. },
  179. "definitions": {
  180. "md.LoginReq": {
  181. "type": "object",
  182. "required": [
  183. "password",
  184. "phone"
  185. ],
  186. "properties": {
  187. "code": {
  188. "type": "string",
  189. "example": "验证码"
  190. },
  191. "password": {
  192. "type": "string",
  193. "example": "登录密码"
  194. },
  195. "phone": {
  196. "type": "string",
  197. "example": "手机号"
  198. }
  199. }
  200. },
  201. "md.LoginResponse": {
  202. "type": "object",
  203. "properties": {
  204. "token": {
  205. "type": "string"
  206. }
  207. }
  208. },
  209. "md.RegisterReq": {
  210. "type": "object",
  211. "required": [
  212. "mobile"
  213. ],
  214. "properties": {
  215. "avatar": {
  216. "type": "string",
  217. "example": "头像"
  218. },
  219. "code": {
  220. "type": "string",
  221. "example": "验证码"
  222. },
  223. "invite_code": {
  224. "type": "string",
  225. "example": "邀请码"
  226. },
  227. "mobile": {
  228. "type": "string"
  229. },
  230. "nickname": {
  231. "type": "string",
  232. "example": "昵称"
  233. },
  234. "open_id": {
  235. "type": "string",
  236. "example": "微信openId"
  237. },
  238. "sex": {
  239. "description": "性别(0:未知 1:男 2:女)",
  240. "type": "integer"
  241. },
  242. "type": {
  243. "type": "string",
  244. "example": "app:APP注册、h5:H5注册"
  245. },
  246. "union_id": {
  247. "type": "string",
  248. "example": "微信UnionId"
  249. }
  250. }
  251. },
  252. "md.Response": {
  253. "type": "object",
  254. "properties": {
  255. "code": {
  256. "type": "string",
  257. "example": "响应码"
  258. },
  259. "data": {
  260. "description": "内容"
  261. },
  262. "msg": {
  263. "type": "string",
  264. "example": "具体错误原因"
  265. }
  266. }
  267. }
  268. }
  269. }