swagger.json 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "This is a gin blog example",
  5. "title": "gin-blog API",
  6. "contact": {},
  7. "version": "0.0.1"
  8. },
  9. "basePath": "/",
  10. "paths": {
  11. "/area/getArea": {
  12. "get": {
  13. "description": "获取省市区",
  14. "produces": [
  15. "application/json"
  16. ],
  17. "tags": [
  18. "area"
  19. ],
  20. "summary": "获取省市区",
  21. "parameters": [
  22. {
  23. "type": "string",
  24. "description": "地区code",
  25. "name": "p_code",
  26. "in": "query"
  27. }
  28. ],
  29. "responses": {
  30. "200": {
  31. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"id\":\"\",\"code\":\"\",\"name\":\"\"}}}",
  32. "schema": {
  33. "type": "string"
  34. }
  35. }
  36. }
  37. }
  38. },
  39. "/cert/list": {
  40. "get": {
  41. "description": "获取证书列表",
  42. "produces": [
  43. "application/json"
  44. ],
  45. "tags": [
  46. "cert"
  47. ],
  48. "summary": "获取证书列表",
  49. "parameters": [
  50. {
  51. "type": "string",
  52. "description": "类型:传1",
  53. "name": "type",
  54. "in": "query"
  55. }
  56. ],
  57. "responses": {
  58. "200": {
  59. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"id\":\"\",\"code\":\"\",\"name\":\"\"}}}",
  60. "schema": {
  61. "type": "string"
  62. }
  63. }
  64. }
  65. }
  66. },
  67. "/cert/userList": {
  68. "get": {
  69. "description": "获取用户获得证书列表",
  70. "produces": [
  71. "application/json"
  72. ],
  73. "tags": [
  74. "cert"
  75. ],
  76. "summary": "获取用户获得证书列表",
  77. "parameters": [
  78. {
  79. "type": "string",
  80. "description": "用户id",
  81. "name": "userId",
  82. "in": "query"
  83. }
  84. ],
  85. "responses": {
  86. "200": {
  87. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"id\":\"\",\"code\":\"\",\"name\":\"\"}}}",
  88. "schema": {
  89. "type": "string"
  90. }
  91. }
  92. }
  93. }
  94. },
  95. "/customer/getBlacklist": {
  96. "post": {
  97. "description": "获取用户黑白名单列表",
  98. "produces": [
  99. "application/json"
  100. ],
  101. "tags": [
  102. "Customer"
  103. ],
  104. "summary": "获取用户黑白名单列表",
  105. "parameters": [
  106. {
  107. "description": "获取黑白名单列表",
  108. "name": "body",
  109. "in": "body",
  110. "required": true,
  111. "schema": {
  112. "$ref": "#/definitions/models.GetBlackListReq"
  113. }
  114. }
  115. ],
  116. "responses": {
  117. "200": {
  118. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"user_id\":\"\",\"username\":\"\",\"user_avatar\":\"https://\"}}}",
  119. "schema": {
  120. "type": "string"
  121. }
  122. }
  123. }
  124. }
  125. },
  126. "/customer/getInfo": {
  127. "get": {
  128. "description": "获取用户详细信息",
  129. "produces": [
  130. "application/json"
  131. ],
  132. "tags": [
  133. "Customer"
  134. ],
  135. "summary": "获取用户详细信息",
  136. "parameters": [
  137. {
  138. "type": "string",
  139. "description": "用户ID",
  140. "name": "user_id",
  141. "in": "query",
  142. "required": true
  143. },
  144. {
  145. "type": "string",
  146. "description": "另一个用户id",
  147. "name": "other_id",
  148. "in": "query"
  149. }
  150. ],
  151. "responses": {
  152. "200": {
  153. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"user_id\":\"\",\"mobile_phone\":\"\",\"user_name\":\"\",\"avatar\":\"https://\",\"gender\":2,\"birthday\":\"\",\"area\":\"江苏省-南京市-鼓楼区\",\"email\":\"\",\"customer_level\":0,\"user_point\":0,\"user_money\":0.00,\"register_time\":\"\"}}}",
  154. "schema": {
  155. "type": "string"
  156. }
  157. }
  158. }
  159. }
  160. },
  161. "/customer/order": {
  162. "get": {
  163. "description": "获取赛事订单",
  164. "produces": [
  165. "application/json"
  166. ],
  167. "tags": [
  168. "Customer"
  169. ],
  170. "summary": "获取赛事订单",
  171. "parameters": [
  172. {
  173. "type": "string",
  174. "description": "用户ID",
  175. "name": "user_id",
  176. "in": "query",
  177. "required": true
  178. }
  179. ],
  180. "responses": {
  181. "200": {
  182. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"user_id\":\"\",\"mobile_phone\":\"\",\"user_name\":\"\",\"avatar\":\"https://\",\"gender\":2,\"birthday\":\"\",\"area\":\"江苏省-南京市-鼓楼区\",\"email\":\"\",\"customer_level\":0,\"user_point\":0,\"user_money\":0.00,\"register_time\":\"\"}}}",
  183. "schema": {
  184. "type": "string"
  185. }
  186. }
  187. }
  188. }
  189. },
  190. "/customer/qualifying": {
  191. "get": {
  192. "description": "获取排位赛列表",
  193. "produces": [
  194. "application/json"
  195. ],
  196. "tags": [
  197. "Customer"
  198. ],
  199. "summary": "获取排位赛列表",
  200. "parameters": [
  201. {
  202. "type": "string",
  203. "description": "用户ID",
  204. "name": "user_id",
  205. "in": "query",
  206. "required": true
  207. }
  208. ],
  209. "responses": {
  210. "200": {
  211. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"user_id\":\"\",\"mobile_phone\":\"\",\"user_name\":\"\",\"avatar\":\"https://\",\"gender\":2,\"birthday\":\"\",\"area\":\"江苏省-南京市-鼓楼区\",\"email\":\"\",\"customer_level\":0,\"user_point\":0,\"user_money\":0.00,\"register_time\":\"\"}}}",
  212. "schema": {
  213. "type": "string"
  214. }
  215. }
  216. }
  217. }
  218. },
  219. "/customer/updateProfile": {
  220. "post": {
  221. "description": "修改用户资料",
  222. "produces": [
  223. "application/json"
  224. ],
  225. "tags": [
  226. "Customer"
  227. ],
  228. "summary": "修改用户资料",
  229. "parameters": [
  230. {
  231. "description": "修改用户资料请求内容",
  232. "name": "body",
  233. "in": "body",
  234. "required": true,
  235. "schema": {
  236. "$ref": "#/definitions/models.UpdateProfileReq"
  237. }
  238. }
  239. ],
  240. "responses": {
  241. "200": {
  242. "description": "{\"code\":200,\"message\":\"success\",\"data\":{}}",
  243. "schema": {
  244. "type": "string"
  245. }
  246. }
  247. }
  248. }
  249. },
  250. "/customer/uploadBase64": {
  251. "post": {
  252. "description": "上传base64图片",
  253. "produces": [
  254. "application/json"
  255. ],
  256. "tags": [
  257. "Customer"
  258. ],
  259. "summary": "上传base64图片",
  260. "parameters": [
  261. {
  262. "description": "修改用户资料请求内容",
  263. "name": "body",
  264. "in": "body",
  265. "required": true,
  266. "schema": {
  267. "$ref": "#/definitions/models.UploadBaseReq"
  268. }
  269. }
  270. ],
  271. "responses": {
  272. "200": {
  273. "description": "{\"code\":200,\"message\":\"success\",\"data\":{}}",
  274. "schema": {
  275. "type": "string"
  276. }
  277. }
  278. }
  279. }
  280. },
  281. "/medal/list": {
  282. "get": {
  283. "description": "获取勋章列表",
  284. "produces": [
  285. "application/json"
  286. ],
  287. "tags": [
  288. "medal"
  289. ],
  290. "summary": "获取勋章列表",
  291. "parameters": [
  292. {
  293. "type": "string",
  294. "description": "类型:传1",
  295. "name": "type",
  296. "in": "query"
  297. }
  298. ],
  299. "responses": {
  300. "200": {
  301. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"id\":\"\",\"code\":\"\",\"name\":\"\"}}}",
  302. "schema": {
  303. "type": "string"
  304. }
  305. }
  306. }
  307. }
  308. },
  309. "/medal/userList": {
  310. "get": {
  311. "description": "获取用户获得勋章列表",
  312. "produces": [
  313. "application/json"
  314. ],
  315. "tags": [
  316. "medal"
  317. ],
  318. "summary": "获取用户获得勋章列表",
  319. "parameters": [
  320. {
  321. "type": "string",
  322. "description": "用户id",
  323. "name": "userId",
  324. "in": "query"
  325. }
  326. ],
  327. "responses": {
  328. "200": {
  329. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"id\":\"\",\"code\":\"\",\"name\":\"\"}}}",
  330. "schema": {
  331. "type": "string"
  332. }
  333. }
  334. }
  335. }
  336. },
  337. "/passport/quickLogin": {
  338. "post": {
  339. "security": [
  340. {
  341. "ApiKeyAuth": []
  342. }
  343. ],
  344. "description": "登录注册",
  345. "consumes": [
  346. "application/json"
  347. ],
  348. "produces": [
  349. "application/json"
  350. ],
  351. "tags": [
  352. "Passport"
  353. ],
  354. "summary": "登录注册",
  355. "parameters": [
  356. {
  357. "description": "快捷登录请求内容",
  358. "name": "body",
  359. "in": "body",
  360. "required": true,
  361. "schema": {
  362. "$ref": "#/definitions/models.QuickLoginReq"
  363. }
  364. }
  365. ],
  366. "responses": {
  367. "200": {
  368. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"user\":{}}}",
  369. "schema": {
  370. "type": "string"
  371. }
  372. }
  373. }
  374. }
  375. },
  376. "/sms/get": {
  377. "get": {
  378. "security": [
  379. {
  380. "ApiKeyAuth": []
  381. }
  382. ],
  383. "description": "获取短信验证码",
  384. "produces": [
  385. "application/json"
  386. ],
  387. "tags": [
  388. "Sms"
  389. ],
  390. "summary": "获取短信验证码",
  391. "parameters": [
  392. {
  393. "type": "string",
  394. "description": "手机号码",
  395. "name": "mobile",
  396. "in": "query",
  397. "required": true
  398. },
  399. {
  400. "enum": [
  401. 1,
  402. 2,
  403. 3,
  404. 4
  405. ],
  406. "type": "integer",
  407. "default": 1,
  408. "description": "短信验证码类型(1=注册登录)",
  409. "name": "type",
  410. "in": "query",
  411. "required": true
  412. }
  413. ],
  414. "responses": {
  415. "200": {
  416. "description": "{\"code\":200, \"message\":\"success\"}",
  417. "schema": {
  418. "type": "string"
  419. }
  420. }
  421. }
  422. }
  423. },
  424. "/sms/remind": {
  425. "post": {
  426. "security": [
  427. {
  428. "ApiKeyAuth": []
  429. }
  430. ],
  431. "description": "发送提醒短信",
  432. "consumes": [
  433. "application/json"
  434. ],
  435. "produces": [
  436. "application/json"
  437. ],
  438. "tags": [
  439. "Sms"
  440. ],
  441. "summary": "发送提醒短信",
  442. "parameters": [
  443. {
  444. "description": "短信请求内容",
  445. "name": "body",
  446. "in": "body",
  447. "required": true,
  448. "schema": {
  449. "$ref": "#/definitions/models.SendSmsReq"
  450. }
  451. }
  452. ],
  453. "responses": {
  454. "200": {
  455. "description": "{\"code\":200, \"message\":\"success\"}",
  456. "schema": {
  457. "type": "string"
  458. }
  459. }
  460. }
  461. }
  462. }
  463. },
  464. "definitions": {
  465. "models.GetBlackListReq": {
  466. "type": "object",
  467. "properties": {
  468. "type": {
  469. "description": "类型",
  470. "type": "integer"
  471. },
  472. "user_id": {
  473. "description": "用户ID",
  474. "type": "string"
  475. }
  476. }
  477. },
  478. "models.QuickLoginReq": {
  479. "type": "object",
  480. "properties": {
  481. "mobile_phone": {
  482. "type": "string"
  483. },
  484. "valid_code": {
  485. "type": "string"
  486. }
  487. }
  488. },
  489. "models.SendSmsReq": {
  490. "type": "object",
  491. "properties": {
  492. "content": {
  493. "type": "string"
  494. },
  495. "mobile": {
  496. "type": "string"
  497. }
  498. }
  499. },
  500. "models.UpdateProfileReq": {
  501. "type": "object",
  502. "properties": {
  503. "area": {
  504. "description": "地区",
  505. "type": "string"
  506. },
  507. "birthday": {
  508. "description": "生日",
  509. "type": "string"
  510. },
  511. "gender": {
  512. "description": "性别",
  513. "type": "integer"
  514. },
  515. "height": {
  516. "description": "用户身高",
  517. "type": "integer"
  518. },
  519. "user_avatar": {
  520. "description": "地区",
  521. "type": "string"
  522. },
  523. "user_id": {
  524. "description": "用户代码",
  525. "type": "string"
  526. },
  527. "username": {
  528. "description": "会员昵称",
  529. "type": "string"
  530. },
  531. "weight": {
  532. "description": "用户体重",
  533. "type": "integer"
  534. }
  535. }
  536. },
  537. "models.UploadBaseReq": {
  538. "type": "object",
  539. "properties": {
  540. "base64": {
  541. "description": "base64字符串",
  542. "type": "string"
  543. },
  544. "map_base": {
  545. "description": "mapBase64",
  546. "type": "string"
  547. },
  548. "task_id": {
  549. "description": "任务id",
  550. "type": "string"
  551. },
  552. "user_id": {
  553. "description": "用户id",
  554. "type": "string"
  555. }
  556. }
  557. }
  558. },
  559. "securityDefinitions": {
  560. "ApiKeyAuth": {
  561. "type": "apiKey",
  562. "name": "x-app-id",
  563. "in": "header"
  564. }
  565. }
  566. }