You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

swagger.yaml 13 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. definitions:
  2. requestparams.CommunityParams:
  3. properties:
  4. avatar:
  5. description: Avatar is optional.
  6. type: string
  7. description:
  8. description: Description is optional.
  9. type: string
  10. email:
  11. type: string
  12. name:
  13. type: string
  14. required:
  15. - avatar
  16. - email
  17. - name
  18. type: object
  19. requestparams.CreateBotParams:
  20. properties:
  21. avatar:
  22. type: string
  23. bot_addr:
  24. type: string
  25. bot_port:
  26. type: integer
  27. bot_token:
  28. type: string
  29. description:
  30. type: string
  31. nickname:
  32. type: string
  33. required:
  34. - avatar
  35. - bot_addr
  36. - bot_port
  37. - bot_token
  38. - description
  39. - nickname
  40. type: object
  41. requestparams.CreateUserParams:
  42. properties:
  43. avatar:
  44. description: Avatar is optional.
  45. type: string
  46. email:
  47. type: string
  48. nickname:
  49. type: string
  50. password:
  51. type: string
  52. required:
  53. - avatar
  54. - email
  55. - nickname
  56. - password
  57. type: object
  58. requestparams.DeleteUserParams:
  59. properties:
  60. uuid:
  61. type: string
  62. required:
  63. - uuid
  64. type: object
  65. requestparams.GetCommunityInfoParams:
  66. properties:
  67. uuid:
  68. type: string
  69. required:
  70. - uuid
  71. type: object
  72. requestparams.LoginParamsWithAccount:
  73. properties:
  74. email:
  75. type: string
  76. password:
  77. type: string
  78. required:
  79. - email
  80. - password
  81. type: object
  82. requestparams.RegisterAdminParams:
  83. properties:
  84. code:
  85. type: string
  86. community_info:
  87. $ref: '#/definitions/requestparams.CommunityParams'
  88. user_info:
  89. $ref: '#/definitions/requestparams.CreateUserParams'
  90. required:
  91. - code
  92. - community_info
  93. - user_info
  94. type: object
  95. requestparams.RegisterStaffParams:
  96. properties:
  97. user_info:
  98. $ref: '#/definitions/requestparams.CreateUserParams'
  99. required:
  100. - user_info
  101. type: object
  102. requestparams.SendToParams:
  103. properties:
  104. email:
  105. type: string
  106. required:
  107. - email
  108. type: object
  109. response.Response:
  110. properties:
  111. code:
  112. type: integer
  113. data: {}
  114. msg:
  115. type: string
  116. type: object
  117. info:
  118. contact: {}
  119. description: OpenKF Server API Docs.
  120. title: OpenKF Server
  121. version: v0.2.0
  122. paths:
  123. /api/v1/admin/bot/create:
  124. post:
  125. description: Create a new bot
  126. parameters:
  127. - description: CreateBotParams
  128. in: body
  129. name: data
  130. required: true
  131. schema:
  132. $ref: '#/definitions/requestparams.CreateBotParams'
  133. produces:
  134. - application/json
  135. responses:
  136. "200":
  137. description: Success
  138. schema:
  139. allOf:
  140. - $ref: '#/definitions/response.Response'
  141. - properties:
  142. msg:
  143. type: string
  144. type: object
  145. security:
  146. - ApiKeyAuth: []
  147. summary: CreateBot
  148. tags:
  149. - bot
  150. /api/v1/admin/bot/delete:
  151. post:
  152. description: delete bot
  153. responses:
  154. "200":
  155. description: Success
  156. schema:
  157. allOf:
  158. - $ref: '#/definitions/response.Response'
  159. - properties:
  160. msg:
  161. type: string
  162. type: object
  163. security:
  164. - ApiKeyAuth: []
  165. summary: DeleteBot
  166. tags:
  167. - bot
  168. /api/v1/admin/bot/list:
  169. post:
  170. description: get community bot info
  171. responses:
  172. "200":
  173. description: Success
  174. schema:
  175. allOf:
  176. - $ref: '#/definitions/response.Response'
  177. - properties:
  178. msg:
  179. type: string
  180. type: object
  181. security:
  182. - ApiKeyAuth: []
  183. summary: ListBot
  184. tags:
  185. - bot
  186. /api/v1/admin/bot/update:
  187. post:
  188. description: update bot info
  189. responses:
  190. "200":
  191. description: Success
  192. schema:
  193. allOf:
  194. - $ref: '#/definitions/response.Response'
  195. - properties:
  196. msg:
  197. type: string
  198. type: object
  199. security:
  200. - ApiKeyAuth: []
  201. summary: UpdateBot
  202. tags:
  203. - bot
  204. /api/v1/admin/staff/create:
  205. post:
  206. description: Create a new staff
  207. parameters:
  208. - description: RegisterStaffParams
  209. in: body
  210. name: data
  211. required: true
  212. schema:
  213. $ref: '#/definitions/requestparams.RegisterStaffParams'
  214. produces:
  215. - application/json
  216. responses:
  217. "200":
  218. description: Success
  219. schema:
  220. allOf:
  221. - $ref: '#/definitions/response.Response'
  222. - properties:
  223. msg:
  224. type: string
  225. type: object
  226. security:
  227. - ApiKeyAuth: []
  228. summary: CreateStaff
  229. tags:
  230. - user
  231. /api/v1/admin/staff/delete:
  232. post:
  233. description: Delete a new staff
  234. parameters:
  235. - description: DeleteUserParams
  236. in: body
  237. name: data
  238. required: true
  239. schema:
  240. $ref: '#/definitions/requestparams.DeleteUserParams'
  241. produces:
  242. - application/json
  243. responses:
  244. "200":
  245. description: Success
  246. schema:
  247. allOf:
  248. - $ref: '#/definitions/response.Response'
  249. - properties:
  250. msg:
  251. type: string
  252. type: object
  253. summary: DeleteStaff
  254. tags:
  255. - user
  256. /api/v1/common/file/upload:
  257. post:
  258. description: upload a file
  259. parameters:
  260. - description: file
  261. in: formData
  262. name: file
  263. required: true
  264. type: file
  265. produces:
  266. - application/json
  267. responses:
  268. "200":
  269. description: Success
  270. schema:
  271. allOf:
  272. - $ref: '#/definitions/response.Response'
  273. - properties:
  274. msg:
  275. type: string
  276. type: object
  277. summary: UploadFile
  278. tags:
  279. - common
  280. /api/v1/community/create:
  281. post:
  282. description: Create a new community
  283. parameters:
  284. - description: Community
  285. in: body
  286. name: data
  287. required: true
  288. schema:
  289. $ref: '#/definitions/requestparams.CommunityParams'
  290. produces:
  291. - application/json
  292. responses:
  293. "200":
  294. description: Success
  295. schema:
  296. allOf:
  297. - $ref: '#/definitions/response.Response'
  298. - properties:
  299. msg:
  300. type: string
  301. type: object
  302. summary: CreateCommunity
  303. tags:
  304. - community
  305. /api/v1/community/info:
  306. post:
  307. description: get community info
  308. parameters:
  309. - description: GetCommunityInfoParams
  310. in: body
  311. name: data
  312. required: true
  313. schema:
  314. $ref: '#/definitions/requestparams.GetCommunityInfoParams'
  315. produces:
  316. - application/json
  317. responses:
  318. "200":
  319. description: Success
  320. schema:
  321. allOf:
  322. - $ref: '#/definitions/response.Response'
  323. - properties:
  324. msg:
  325. type: string
  326. type: object
  327. summary: GetCommunityInfo
  328. tags:
  329. - community
  330. /api/v1/community/me:
  331. get:
  332. description: get my community info
  333. produces:
  334. - application/json
  335. responses:
  336. "200":
  337. description: Success
  338. schema:
  339. allOf:
  340. - $ref: '#/definitions/response.Response'
  341. - properties:
  342. msg:
  343. type: string
  344. type: object
  345. security:
  346. - ApiKeyAuth: []
  347. summary: GetMyCommunityInfo
  348. tags:
  349. - community
  350. /api/v1/community/update:
  351. post:
  352. description: get my community info
  353. produces:
  354. - application/json
  355. responses:
  356. "200":
  357. description: Success
  358. schema:
  359. allOf:
  360. - $ref: '#/definitions/response.Response'
  361. - properties:
  362. msg:
  363. type: string
  364. type: object
  365. security:
  366. - ApiKeyAuth: []
  367. summary: GetMyCommunityInfo
  368. tags:
  369. - community
  370. /api/v1/email/code:
  371. post:
  372. description: Use email to send verification code
  373. parameters:
  374. - description: Email address
  375. in: body
  376. name: data
  377. required: true
  378. schema:
  379. $ref: '#/definitions/requestparams.SendToParams'
  380. produces:
  381. - application/json
  382. responses:
  383. "200":
  384. description: Success
  385. schema:
  386. allOf:
  387. - $ref: '#/definitions/response.Response'
  388. - properties:
  389. msg:
  390. type: string
  391. type: object
  392. summary: SendCode
  393. tags:
  394. - mail
  395. /api/v1/login/account:
  396. post:
  397. description: login with account
  398. parameters:
  399. - description: LoginParamsWithAccount
  400. in: body
  401. name: data
  402. required: true
  403. schema:
  404. $ref: '#/definitions/requestparams.LoginParamsWithAccount'
  405. produces:
  406. - application/json
  407. responses:
  408. "200":
  409. description: Success
  410. schema:
  411. allOf:
  412. - $ref: '#/definitions/response.Response'
  413. - properties:
  414. msg:
  415. type: string
  416. type: object
  417. summary: AccountLogin
  418. tags:
  419. - user
  420. /api/v1/openim/callback:
  421. post:
  422. description: Support OpenIM callback
  423. produces:
  424. - application/json
  425. responses:
  426. "200":
  427. description: Success
  428. schema:
  429. allOf:
  430. - $ref: '#/definitions/response.Response'
  431. - properties:
  432. msg:
  433. type: string
  434. type: object
  435. summary: OpenIMCallback
  436. tags:
  437. - openim
  438. /api/v1/register/admin:
  439. post:
  440. description: Create a new admin
  441. parameters:
  442. - description: RegisterAdminParams
  443. in: body
  444. name: data
  445. required: true
  446. schema:
  447. $ref: '#/definitions/requestparams.RegisterAdminParams'
  448. produces:
  449. - application/json
  450. responses:
  451. "200":
  452. description: Success
  453. schema:
  454. allOf:
  455. - $ref: '#/definitions/response.Response'
  456. - properties:
  457. msg:
  458. type: string
  459. type: object
  460. summary: AdminRegister
  461. tags:
  462. - user
  463. /api/v1/user/info:
  464. post:
  465. description: get user info
  466. responses:
  467. "200":
  468. description: Success
  469. schema:
  470. allOf:
  471. - $ref: '#/definitions/response.Response'
  472. - properties:
  473. msg:
  474. type: string
  475. type: object
  476. security:
  477. - ApiKeyAuth: []
  478. summary: GetUserInfo
  479. tags:
  480. - user
  481. /api/v1/user/me:
  482. get:
  483. description: get my user info
  484. responses:
  485. "200":
  486. description: Success
  487. schema:
  488. allOf:
  489. - $ref: '#/definitions/response.Response'
  490. - properties:
  491. msg:
  492. type: string
  493. type: object
  494. security:
  495. - ApiKeyAuth: []
  496. summary: GetMyInfo
  497. tags:
  498. - user
  499. /api/v1/user/update:
  500. post:
  501. description: update user info
  502. responses:
  503. "200":
  504. description: Success
  505. schema:
  506. allOf:
  507. - $ref: '#/definitions/response.Response'
  508. - properties:
  509. msg:
  510. type: string
  511. type: object
  512. security:
  513. - ApiKeyAuth: []
  514. summary: UpdateInfo
  515. tags:
  516. - user
  517. /api/v1/user/update-password:
  518. post:
  519. description: update user password
  520. responses:
  521. "200":
  522. description: Success
  523. schema:
  524. allOf:
  525. - $ref: '#/definitions/response.Response'
  526. - properties:
  527. msg:
  528. type: string
  529. type: object
  530. security:
  531. - ApiKeyAuth: []
  532. summary: UpdatePassword
  533. tags:
  534. - user
  535. /api/v1/user/userlist:
  536. post:
  537. description: get community user info
  538. responses:
  539. "200":
  540. description: Success
  541. schema:
  542. allOf:
  543. - $ref: '#/definitions/response.Response'
  544. - properties:
  545. msg:
  546. type: string
  547. type: object
  548. security:
  549. - ApiKeyAuth: []
  550. summary: GetCommunityUserList
  551. tags:
  552. - user
  553. securityDefinitions:
  554. ApiKeyAuth:
  555. in: header
  556. name: Authorization
  557. type: apiKey
  558. swagger: "2.0"