v3-groups.yaml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-groups.yaml
  2. get:
  3. summary: 搜公开团队
  4. tags:
  5. - groups
  6. operationId: get_api_v3_groups
  7. description: |-
  8. 共享资源时挑团队用。只列公开团队(status 30),按名字排序。
  9. 实现:`V3\GroupController@index`
  10. security:
  11. -
  12. bearerAuth: []
  13. parameters:
  14. -
  15. name: per_page
  16. in: query
  17. schema:
  18. type: integer
  19. default: 20
  20. description: '每页数量,最大 200'
  21. -
  22. name: search
  23. in: query
  24. schema:
  25. type: string
  26. description: 按团队名模糊匹配
  27. -
  28. name: page
  29. in: query
  30. schema:
  31. type: integer
  32. default: 1
  33. description: 页码
  34. responses:
  35. 200:
  36. description: 成功
  37. content:
  38. application/json:
  39. schema:
  40. type: object
  41. properties:
  42. data:
  43. type: array
  44. items:
  45. type: object
  46. properties:
  47. id:
  48. type: string
  49. name:
  50. type: string
  51. description:
  52. type: string
  53. nullable: true
  54. status:
  55. type: integer
  56. owner:
  57. type: object
  58. properties: { id: { type: string }, nickName: { type: string }, userName: { type: string }, realName: { type: string }, sn: { type: integer }, avatar: { type: string }, roles: { type: array, items: { type: string } } }
  59. nullable: true
  60. role:
  61. type: string
  62. nullable: true
  63. description: 仅在部分查询口径下返回。
  64. created_at:
  65. type: string
  66. updated_at:
  67. type: string
  68. meta:
  69. $ref: '../../main.yaml#/components/schemas/PaginationMeta'
  70. 401:
  71. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
  72. 422:
  73. $ref: '../../main.yaml#/components/responses/ProblemValidation'
  74. post:
  75. summary: 建团队
  76. tags:
  77. - groups
  78. operationId: post_api_v3_groups
  79. description: |-
  80. 建的人成为 owner。同一个人名下不能重名。
  81. 实现:`V3\GroupController@store`
  82. security:
  83. -
  84. bearerAuth: []
  85. requestBody:
  86. required: true
  87. content:
  88. application/json:
  89. schema:
  90. type: object
  91. properties:
  92. name:
  93. type: string
  94. description: '团队名,最长 64'
  95. description:
  96. type: string
  97. description: '简介,最长 1024'
  98. status:
  99. type: integer
  100. description: '10 私有、30 公开'
  101. default: 30
  102. required:
  103. - name
  104. responses:
  105. 200:
  106. description: 成功
  107. content:
  108. application/json:
  109. schema:
  110. type: object
  111. properties:
  112. data:
  113. type: object
  114. properties:
  115. id:
  116. type: string
  117. name:
  118. type: string
  119. description:
  120. type: string
  121. nullable: true
  122. status:
  123. type: integer
  124. owner:
  125. type: object
  126. properties:
  127. id: { type: string }
  128. nickName: { type: string }
  129. userName: { type: string }
  130. realName: { type: string }
  131. sn: { type: integer }
  132. avatar: { type: string }
  133. roles: { type: array, items: { type: string } }
  134. nullable: true
  135. role:
  136. type: string
  137. nullable: true
  138. description: 仅在部分查询口径下返回。
  139. created_at:
  140. type: string
  141. updated_at:
  142. type: string
  143. 201:
  144. description: 建好了
  145. content:
  146. application/json:
  147. schema:
  148. type: object
  149. properties:
  150. data:
  151. type: object
  152. properties:
  153. id:
  154. type: string
  155. name:
  156. type: string
  157. description:
  158. type: string
  159. nullable: true
  160. status:
  161. type: integer
  162. owner:
  163. type: object
  164. properties:
  165. id: { type: string }
  166. nickName: { type: string }
  167. userName: { type: string }
  168. realName: { type: string }
  169. sn: { type: integer }
  170. avatar: { type: string }
  171. roles: { type: array, items: { type: string } }
  172. nullable: true
  173. role:
  174. type: string
  175. nullable: true
  176. description: 仅在部分查询口径下返回。
  177. created_at:
  178. type: string
  179. updated_at:
  180. type: string
  181. 401:
  182. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
  183. 422:
  184. $ref: '../../main.yaml#/components/responses/ProblemValidation'