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 4.2 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. definitions:
  2. param.CommunityParams:
  3. properties:
  4. avatar:
  5. type: string
  6. email:
  7. type: string
  8. name:
  9. type: string
  10. required:
  11. - avatar
  12. - email
  13. - name
  14. type: object
  15. param.CreateUserParams:
  16. properties:
  17. avatar:
  18. type: string
  19. email:
  20. type: string
  21. nickname:
  22. type: string
  23. password:
  24. type: string
  25. required:
  26. - avatar
  27. - email
  28. - nickname
  29. - password
  30. type: object
  31. param.RegisterAdminParams:
  32. properties:
  33. code:
  34. type: string
  35. community_info:
  36. $ref: '#/definitions/param.CommunityParams'
  37. user_info:
  38. $ref: '#/definitions/param.CreateUserParams'
  39. required:
  40. - code
  41. - community_info
  42. - user_info
  43. type: object
  44. param.RegisterStaffParams:
  45. properties:
  46. community_id:
  47. type: integer
  48. user_info:
  49. $ref: '#/definitions/param.CreateUserParams'
  50. required:
  51. - community_id
  52. - user_info
  53. type: object
  54. param.SendToParams:
  55. properties:
  56. email:
  57. type: string
  58. required:
  59. - email
  60. type: object
  61. response.Response:
  62. properties:
  63. code:
  64. type: integer
  65. data: {}
  66. msg:
  67. type: string
  68. type: object
  69. info:
  70. contact: {}
  71. paths:
  72. /api/v1/community/create:
  73. post:
  74. description: Create a new community
  75. parameters:
  76. - description: Community
  77. in: body
  78. name: data
  79. required: true
  80. schema:
  81. $ref: '#/definitions/param.CommunityParams'
  82. produces:
  83. - application/json
  84. responses:
  85. "200":
  86. description: Success
  87. schema:
  88. allOf:
  89. - $ref: '#/definitions/response.Response'
  90. - properties:
  91. msg:
  92. type: string
  93. type: object
  94. summary: CreateCommunity
  95. tags:
  96. - community
  97. /api/v1/email/code:
  98. post:
  99. description: Use email to send verification code
  100. parameters:
  101. - description: Email address
  102. in: body
  103. name: data
  104. required: true
  105. schema:
  106. $ref: '#/definitions/param.SendToParams'
  107. produces:
  108. - application/json
  109. responses:
  110. "200":
  111. description: Success
  112. schema:
  113. allOf:
  114. - $ref: '#/definitions/response.Response'
  115. - properties:
  116. msg:
  117. type: string
  118. type: object
  119. summary: SendCode
  120. tags:
  121. - mail
  122. /api/v1/openim/callback:
  123. post:
  124. description: Support OpenIM callback
  125. produces:
  126. - application/json
  127. responses:
  128. "200":
  129. description: Success
  130. schema:
  131. allOf:
  132. - $ref: '#/definitions/response.Response'
  133. - properties:
  134. msg:
  135. type: string
  136. type: object
  137. summary: OpenIMCallback
  138. tags:
  139. - openim
  140. /api/v1/register/admin:
  141. post:
  142. description: Create a new admin
  143. parameters:
  144. - description: RegisterAdminParams
  145. in: body
  146. name: data
  147. required: true
  148. schema:
  149. $ref: '#/definitions/param.RegisterAdminParams'
  150. produces:
  151. - application/json
  152. responses:
  153. "200":
  154. description: Success
  155. schema:
  156. allOf:
  157. - $ref: '#/definitions/response.Response'
  158. - properties:
  159. msg:
  160. type: string
  161. type: object
  162. summary: AdminRegister
  163. tags:
  164. - user
  165. /api/v1/register/staff:
  166. post:
  167. description: Create a new staff
  168. parameters:
  169. - description: RegisterStaffParams
  170. in: body
  171. name: data
  172. required: true
  173. schema:
  174. $ref: '#/definitions/param.RegisterStaffParams'
  175. produces:
  176. - application/json
  177. responses:
  178. "200":
  179. description: Success
  180. schema:
  181. allOf:
  182. - $ref: '#/definitions/response.Response'
  183. - properties:
  184. msg:
  185. type: string
  186. type: object
  187. summary: StaffRegister
  188. tags:
  189. - user
  190. swagger: "2.0"