swagger.json 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "contact": {}
  5. },
  6. "paths": {
  7. "/api/chatroom/create": {
  8. "post": {
  9. "description": "创建聊天室",
  10. "consumes": [
  11. "application/json"
  12. ],
  13. "produces": [
  14. "application/json"
  15. ],
  16. "tags": [
  17. "房间管理"
  18. ],
  19. "summary": "创建聊天室",
  20. "parameters": [
  21. {
  22. "description": "创建聊天室请求body",
  23. "name": "body",
  24. "in": "body",
  25. "required": true,
  26. "schema": {
  27. "$ref": "#/definitions/models.CreateChatroomReq"
  28. }
  29. }
  30. ],
  31. "responses": {
  32. "200": {
  33. "description": "{\"code\":200, \"message\":\"success\"}",
  34. "schema": {
  35. "type": "string"
  36. }
  37. }
  38. }
  39. }
  40. },
  41. "/api/chatroom/delete": {
  42. "get": {
  43. "description": "删除聊天室",
  44. "consumes": [
  45. "application/json"
  46. ],
  47. "produces": [
  48. "application/json"
  49. ],
  50. "tags": [
  51. "房间管理"
  52. ],
  53. "summary": "删除聊天室",
  54. "parameters": [
  55. {
  56. "type": "string",
  57. "description": "用户ID",
  58. "name": "userId",
  59. "in": "query",
  60. "required": true
  61. },
  62. {
  63. "type": "string",
  64. "description": "房间ID",
  65. "name": "roomId",
  66. "in": "query",
  67. "required": true
  68. }
  69. ],
  70. "responses": {
  71. "200": {
  72. "description": "{\"code\":200, \"message\":\"success\"}",
  73. "schema": {
  74. "type": "string"
  75. }
  76. }
  77. }
  78. }
  79. },
  80. "/api/chatroom/detail": {
  81. "get": {
  82. "description": "获取房间详情",
  83. "consumes": [
  84. "application/json"
  85. ],
  86. "produces": [
  87. "application/json"
  88. ],
  89. "tags": [
  90. "房间操作"
  91. ],
  92. "summary": "获取房间详情",
  93. "parameters": [
  94. {
  95. "type": "string",
  96. "description": "房间id",
  97. "name": "room_id",
  98. "in": "query",
  99. "required": true
  100. }
  101. ],
  102. "responses": {
  103. "200": {
  104. "description": "{\"code\":200, \"message\":\"success\"}",
  105. "schema": {
  106. "type": "string"
  107. }
  108. }
  109. }
  110. }
  111. },
  112. "/api/chatroom/join": {
  113. "post": {
  114. "description": "加入房间",
  115. "consumes": [
  116. "application/json"
  117. ],
  118. "produces": [
  119. "application/json"
  120. ],
  121. "tags": [
  122. "房间管理"
  123. ],
  124. "summary": "加入房间",
  125. "parameters": [
  126. {
  127. "description": "加入房间请求body",
  128. "name": "body",
  129. "in": "body",
  130. "required": true,
  131. "schema": {
  132. "$ref": "#/definitions/models.JoinChatroomParam"
  133. }
  134. }
  135. ],
  136. "responses": {
  137. "200": {
  138. "description": "{\"code\":200, \"message\":\"success\"}",
  139. "schema": {
  140. "type": "string"
  141. }
  142. }
  143. }
  144. }
  145. },
  146. "/api/chatroom/joinCreate": {
  147. "post": {
  148. "description": "创建并加入房间",
  149. "consumes": [
  150. "application/json"
  151. ],
  152. "produces": [
  153. "application/json"
  154. ],
  155. "tags": [
  156. "房间管理"
  157. ],
  158. "summary": "创建并加入房间",
  159. "parameters": [
  160. {
  161. "description": "创建并加入房间请求body",
  162. "name": "body",
  163. "in": "body",
  164. "required": true,
  165. "schema": {
  166. "$ref": "#/definitions/models.JoinChatroomReq"
  167. }
  168. }
  169. ],
  170. "responses": {
  171. "200": {
  172. "description": "{\"code\":200, \"message\":\"success\"}",
  173. "schema": {
  174. "type": "string"
  175. }
  176. }
  177. }
  178. }
  179. },
  180. "/api/chatroom/leave": {
  181. "post": {
  182. "description": "离开房间",
  183. "consumes": [
  184. "application/json"
  185. ],
  186. "produces": [
  187. "application/json"
  188. ],
  189. "tags": [
  190. "房间管理"
  191. ],
  192. "summary": "离开房间",
  193. "parameters": [
  194. {
  195. "description": "离开房间请求body",
  196. "name": "body",
  197. "in": "body",
  198. "required": true,
  199. "schema": {
  200. "$ref": "#/definitions/models.LeaveChatroomParam"
  201. }
  202. }
  203. ],
  204. "responses": {
  205. "200": {
  206. "description": "{\"code\":200, \"message\":\"success\"}",
  207. "schema": {
  208. "type": "string"
  209. }
  210. }
  211. }
  212. }
  213. },
  214. "/api/chatroom/list": {
  215. "get": {
  216. "description": "获取聊天室列表",
  217. "consumes": [
  218. "application/json"
  219. ],
  220. "produces": [
  221. "application/json"
  222. ],
  223. "tags": [
  224. "房间管理"
  225. ],
  226. "summary": "获取聊天室列表",
  227. "parameters": [
  228. {
  229. "type": "string",
  230. "description": "用户ID",
  231. "name": "userId",
  232. "in": "query",
  233. "required": true
  234. }
  235. ],
  236. "responses": {
  237. "200": {
  238. "description": "{\"code\":200, \"message\":\"success\"}",
  239. "schema": {
  240. "type": "string"
  241. }
  242. }
  243. }
  244. }
  245. },
  246. "/api/message/deleteInteract": {
  247. "get": {
  248. "description": "互动删除",
  249. "produces": [
  250. "application/json"
  251. ],
  252. "tags": [
  253. "消息管理"
  254. ],
  255. "summary": "互动删除",
  256. "parameters": [
  257. {
  258. "type": "string",
  259. "description": "id",
  260. "name": "id",
  261. "in": "query",
  262. "required": true
  263. },
  264. {
  265. "type": "string",
  266. "description": "互动类型",
  267. "name": "int_type",
  268. "in": "query",
  269. "required": true
  270. }
  271. ],
  272. "responses": {
  273. "200": {
  274. "description": "{\"code\":200, \"message\":\"success\", \"data\":{}}",
  275. "schema": {
  276. "type": "string"
  277. }
  278. }
  279. }
  280. }
  281. },
  282. "/api/message/interact": {
  283. "get": {
  284. "description": "获取互动",
  285. "produces": [
  286. "application/json"
  287. ],
  288. "tags": [
  289. "消息管理"
  290. ],
  291. "summary": "获取互动",
  292. "parameters": [
  293. {
  294. "type": "string",
  295. "description": "用户id",
  296. "name": "userId",
  297. "in": "query",
  298. "required": true
  299. }
  300. ],
  301. "responses": {
  302. "200": {
  303. "description": "{\"code\":200, \"message\":\"success\", \"data\":{}}",
  304. "schema": {
  305. "type": "string"
  306. }
  307. }
  308. }
  309. }
  310. },
  311. "/api/message/notice": {
  312. "get": {
  313. "description": "获取公告",
  314. "produces": [
  315. "application/json"
  316. ],
  317. "tags": [
  318. "消息管理"
  319. ],
  320. "summary": "获取公告",
  321. "parameters": [
  322. {
  323. "type": "string",
  324. "description": "用户id",
  325. "name": "userId",
  326. "in": "query"
  327. }
  328. ],
  329. "responses": {
  330. "200": {
  331. "description": "{\"code\":200, \"message\":\"success\", \"data\":{}}",
  332. "schema": {
  333. "type": "string"
  334. }
  335. }
  336. }
  337. }
  338. },
  339. "/api/message/notice/read": {
  340. "post": {
  341. "description": "公告阅读",
  342. "produces": [
  343. "application/json"
  344. ],
  345. "tags": [
  346. "消息管理"
  347. ],
  348. "summary": "公告阅读",
  349. "parameters": [
  350. {
  351. "description": "阅读公告",
  352. "name": "body",
  353. "in": "body",
  354. "required": true,
  355. "schema": {
  356. "$ref": "#/definitions/models.NoticeReadReq"
  357. }
  358. }
  359. ],
  360. "responses": {
  361. "200": {
  362. "description": "{\"code\":200,\"message\":\"success\",\"data\":{}}",
  363. "schema": {
  364. "type": "string"
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "/api/message/send": {
  371. "post": {
  372. "description": "发送消息",
  373. "consumes": [
  374. "application/json"
  375. ],
  376. "produces": [
  377. "application/json"
  378. ],
  379. "tags": [
  380. "消息管理"
  381. ],
  382. "summary": "发送消息",
  383. "parameters": [
  384. {
  385. "description": "发送请求body",
  386. "name": "body",
  387. "in": "body",
  388. "required": true,
  389. "schema": {
  390. "$ref": "#/definitions/models.MessageParam"
  391. }
  392. }
  393. ],
  394. "responses": {
  395. "200": {
  396. "description": "{\"code\":200, \"message\":\"success\"}",
  397. "schema": {
  398. "type": "string"
  399. }
  400. }
  401. }
  402. }
  403. },
  404. "/api/message/timeline": {
  405. "get": {
  406. "description": "获取历史消息记录",
  407. "produces": [
  408. "application/json"
  409. ],
  410. "tags": [
  411. "消息管理"
  412. ],
  413. "summary": "获取历史消息记录",
  414. "parameters": [
  415. {
  416. "type": "string",
  417. "description": "用户id",
  418. "name": "userId",
  419. "in": "query"
  420. },
  421. {
  422. "type": "string",
  423. "description": "房间id",
  424. "name": "roomId",
  425. "in": "query",
  426. "required": true
  427. },
  428. {
  429. "type": "integer",
  430. "description": "当前页",
  431. "name": "pageIndex",
  432. "in": "query",
  433. "required": true
  434. },
  435. {
  436. "type": "integer",
  437. "description": "每页数量",
  438. "name": "pageSize",
  439. "in": "query",
  440. "required": true
  441. }
  442. ],
  443. "responses": {
  444. "200": {
  445. "description": "{\"code\":200, \"message\":\"success\", \"data\":{}}",
  446. "schema": {
  447. "type": "string"
  448. }
  449. }
  450. }
  451. }
  452. }
  453. },
  454. "definitions": {
  455. "models.CreateChatroomReq": {
  456. "type": "object",
  457. "properties": {
  458. "bCreatorId": {
  459. "type": "string"
  460. },
  461. "creatorId": {
  462. "type": "string"
  463. },
  464. "userCount": {
  465. "type": "integer"
  466. }
  467. }
  468. },
  469. "models.JoinChatroomParam": {
  470. "type": "object",
  471. "properties": {
  472. "roomId": {
  473. "type": "string"
  474. },
  475. "userId": {
  476. "type": "string"
  477. }
  478. }
  479. },
  480. "models.JoinChatroomReq": {
  481. "type": "object",
  482. "properties": {
  483. "bCreatorId": {
  484. "type": "string"
  485. },
  486. "creatorId": {
  487. "type": "string"
  488. },
  489. "userCount": {
  490. "type": "integer"
  491. }
  492. }
  493. },
  494. "models.LeaveChatroomParam": {
  495. "type": "object",
  496. "properties": {
  497. "roomId": {
  498. "type": "string"
  499. },
  500. "userId": {
  501. "type": "string"
  502. }
  503. }
  504. },
  505. "models.MessageParam": {
  506. "type": "object",
  507. "properties": {
  508. "message": {
  509. "type": "string"
  510. },
  511. "messageType": {
  512. "type": "string"
  513. },
  514. "roomId": {
  515. "type": "string"
  516. },
  517. "userId": {
  518. "type": "string"
  519. }
  520. }
  521. },
  522. "models.NoticeReadReq": {
  523. "type": "object",
  524. "properties": {
  525. "app_id": {
  526. "type": "string"
  527. },
  528. "notice_id": {
  529. "type": "string"
  530. },
  531. "user_id": {
  532. "type": "string"
  533. }
  534. }
  535. }
  536. }
  537. }