swagger.json 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "contact": {},
  5. "license": {}
  6. },
  7. "paths": {
  8. "/api/chatroom/classification": {
  9. "get": {
  10. "description": "房间分类列表",
  11. "consumes": [
  12. "application/json"
  13. ],
  14. "produces": [
  15. "application/json"
  16. ],
  17. "tags": [
  18. "房间操作"
  19. ],
  20. "summary": "房间分类列表",
  21. "responses": {
  22. "200": {
  23. "description": "{\"code\":200, \"message\":\"success\"}",
  24. "schema": {
  25. "type": "string"
  26. }
  27. }
  28. }
  29. }
  30. },
  31. "/api/chatroom/detail": {
  32. "get": {
  33. "description": "获取房间详情",
  34. "consumes": [
  35. "application/json"
  36. ],
  37. "produces": [
  38. "application/json"
  39. ],
  40. "tags": [
  41. "房间操作"
  42. ],
  43. "summary": "获取房间详情",
  44. "parameters": [
  45. {
  46. "type": "string",
  47. "description": "房间id",
  48. "name": "room_id",
  49. "in": "query",
  50. "required": true
  51. }
  52. ],
  53. "responses": {
  54. "200": {
  55. "description": "{\"code\":200, \"message\":\"success\"}",
  56. "schema": {
  57. "type": "string"
  58. }
  59. }
  60. }
  61. }
  62. },
  63. "/api/chatroom/join": {
  64. "post": {
  65. "description": "加入房间",
  66. "consumes": [
  67. "application/json"
  68. ],
  69. "produces": [
  70. "application/json"
  71. ],
  72. "tags": [
  73. "房间管理"
  74. ],
  75. "summary": "加入房间",
  76. "parameters": [
  77. {
  78. "description": "加入房间请求body",
  79. "name": "body",
  80. "in": "body",
  81. "required": true,
  82. "schema": {
  83. "type": "object",
  84. "$ref": "#/definitions/models.JoinChatroomParam"
  85. }
  86. }
  87. ],
  88. "responses": {
  89. "200": {
  90. "description": "{\"code\":200, \"message\":\"success\"}",
  91. "schema": {
  92. "type": "string"
  93. }
  94. }
  95. }
  96. }
  97. },
  98. "/api/chatroom/leave": {
  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": "离开房间请求body",
  114. "name": "body",
  115. "in": "body",
  116. "required": true,
  117. "schema": {
  118. "type": "object",
  119. "$ref": "#/definitions/models.LeaveChatroomParam"
  120. }
  121. }
  122. ],
  123. "responses": {
  124. "200": {
  125. "description": "{\"code\":200, \"message\":\"success\"}",
  126. "schema": {
  127. "type": "string"
  128. }
  129. }
  130. }
  131. }
  132. },
  133. "/api/chatroom/list": {
  134. "post": {
  135. "description": "房间列表",
  136. "consumes": [
  137. "application/json"
  138. ],
  139. "produces": [
  140. "application/json"
  141. ],
  142. "tags": [
  143. "房间操作"
  144. ],
  145. "summary": "房间列表",
  146. "parameters": [
  147. {
  148. "description": "房间请求列表body",
  149. "name": "body",
  150. "in": "body",
  151. "required": true,
  152. "schema": {
  153. "type": "object",
  154. "$ref": "#/definitions/models.ChatRoomListReq"
  155. }
  156. }
  157. ],
  158. "responses": {
  159. "200": {
  160. "description": "{\"code\":200, \"message\":\"success\"}",
  161. "schema": {
  162. "type": "string"
  163. }
  164. }
  165. }
  166. }
  167. },
  168. "/api/chatroom/view": {
  169. "get": {
  170. "description": "进入直播间",
  171. "consumes": [
  172. "application/json"
  173. ],
  174. "produces": [
  175. "application/json"
  176. ],
  177. "tags": [
  178. "房间操作"
  179. ],
  180. "summary": "进入直播间",
  181. "parameters": [
  182. {
  183. "type": "string",
  184. "description": "房间id",
  185. "name": "room_id",
  186. "in": "query",
  187. "required": true
  188. }
  189. ],
  190. "responses": {
  191. "200": {
  192. "description": "{\"code\":200, \"message\":\"success\"}",
  193. "schema": {
  194. "type": "string"
  195. }
  196. }
  197. }
  198. }
  199. },
  200. "/api/graphic/list": {
  201. "get": {
  202. "description": "图文列表",
  203. "consumes": [
  204. "application/json"
  205. ],
  206. "produces": [
  207. "application/json"
  208. ],
  209. "tags": [
  210. "直播间图文"
  211. ],
  212. "summary": "图文列表",
  213. "parameters": [
  214. {
  215. "type": "string",
  216. "description": "房间id",
  217. "name": "room_id",
  218. "in": "query",
  219. "required": true
  220. }
  221. ],
  222. "responses": {
  223. "200": {
  224. "description": "{\"code\":200, \"message\":\"success\"}",
  225. "schema": {
  226. "type": "string"
  227. }
  228. }
  229. }
  230. }
  231. },
  232. "/api/message/send": {
  233. "post": {
  234. "description": "发送消息",
  235. "consumes": [
  236. "application/json"
  237. ],
  238. "produces": [
  239. "application/json"
  240. ],
  241. "tags": [
  242. "消息管理"
  243. ],
  244. "summary": "发送消息",
  245. "parameters": [
  246. {
  247. "description": "发送请求body",
  248. "name": "body",
  249. "in": "body",
  250. "required": true,
  251. "schema": {
  252. "type": "object",
  253. "$ref": "#/definitions/models.MessageParam"
  254. }
  255. }
  256. ],
  257. "responses": {
  258. "200": {
  259. "description": "{\"code\":200, \"message\":\"success\"}",
  260. "schema": {
  261. "type": "string"
  262. }
  263. }
  264. }
  265. }
  266. },
  267. "/api/message/timeline": {
  268. "get": {
  269. "description": "获取历史消息记录",
  270. "produces": [
  271. "application/json"
  272. ],
  273. "tags": [
  274. "消息管理"
  275. ],
  276. "summary": "获取历史消息记录",
  277. "parameters": [
  278. {
  279. "type": "string",
  280. "description": "用户id",
  281. "name": "userId",
  282. "in": "query"
  283. },
  284. {
  285. "type": "string",
  286. "description": "房间id",
  287. "name": "roomId",
  288. "in": "query",
  289. "required": true
  290. },
  291. {
  292. "type": "integer",
  293. "description": "当前页",
  294. "name": "pageIndex",
  295. "in": "query",
  296. "required": true
  297. },
  298. {
  299. "type": "integer",
  300. "description": "每页数量",
  301. "name": "pageSize",
  302. "in": "query",
  303. "required": true
  304. }
  305. ],
  306. "responses": {
  307. "200": {
  308. "description": "{\"code\":200, \"message\":\"success\", \"data\":{}}",
  309. "schema": {
  310. "type": "string"
  311. }
  312. }
  313. }
  314. }
  315. },
  316. "/api/wx/share": {
  317. "get": {
  318. "description": "微信自定义分享",
  319. "consumes": [
  320. "application/json"
  321. ],
  322. "produces": [
  323. "application/json"
  324. ],
  325. "tags": [
  326. "用户操作"
  327. ],
  328. "summary": "分享",
  329. "responses": {
  330. "200": {
  331. "description": "{\"code\":200, \"message\":\"success\"}",
  332. "schema": {
  333. "type": "string"
  334. }
  335. }
  336. }
  337. }
  338. },
  339. "/wx/h5/login": {
  340. "get": {
  341. "description": "登录",
  342. "consumes": [
  343. "application/json"
  344. ],
  345. "produces": [
  346. "application/json"
  347. ],
  348. "tags": [
  349. "用户操作"
  350. ],
  351. "summary": "登录",
  352. "responses": {
  353. "200": {
  354. "description": "{\"code\":200, \"message\":\"success\"}",
  355. "schema": {
  356. "type": "string"
  357. }
  358. }
  359. }
  360. }
  361. }
  362. },
  363. "definitions": {
  364. "models.ChatRoomListReq": {
  365. "type": "object",
  366. "properties": {
  367. "category": {
  368. "type": "string"
  369. },
  370. "name": {
  371. "type": "string"
  372. },
  373. "page": {
  374. "type": "integer"
  375. },
  376. "pageSize": {
  377. "type": "integer"
  378. }
  379. }
  380. },
  381. "models.JoinChatroomParam": {
  382. "type": "object",
  383. "properties": {
  384. "roomId": {
  385. "type": "string"
  386. },
  387. "userId": {
  388. "type": "string"
  389. }
  390. }
  391. },
  392. "models.LeaveChatroomParam": {
  393. "type": "object",
  394. "properties": {
  395. "roomId": {
  396. "type": "string"
  397. },
  398. "userId": {
  399. "type": "string"
  400. }
  401. }
  402. },
  403. "models.MessageParam": {
  404. "type": "object",
  405. "properties": {
  406. "message": {
  407. "type": "string"
  408. },
  409. "messageType": {
  410. "type": "string"
  411. },
  412. "roomId": {
  413. "type": "string"
  414. },
  415. "userId": {
  416. "type": "string"
  417. }
  418. }
  419. }
  420. }
  421. }