v3-groups-group-members-member.yaml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-groups-group-members-member.yaml
  2. delete:
  3. summary: '移除成员 / 退出团队'
  4. tags:
  5. - groups
  6. operationId: delete_api_v3_groups_group_members_member_
  7. description: |-
  8. 移除别人要 owner / manager;移除自己就是退出团队。owner 不能被移除、也不能退出。
  9. 硬删,成功返回 204 空体。
  10. 实现:`V3\GroupMemberController@destroy`
  11. security:
  12. -
  13. bearerAuth: []
  14. parameters:
  15. -
  16. name: group
  17. in: path
  18. required: true
  19. schema:
  20. type: string
  21. description: '团队 uid'
  22. -
  23. name: member
  24. in: path
  25. required: true
  26. schema:
  27. type: string
  28. description: '成员记录 id'
  29. responses:
  30. 204:
  31. description: 已移除,无响应体
  32. 401:
  33. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
  34. 403:
  35. description: 不能移除这名成员
  36. content:
  37. application/problem+json:
  38. schema:
  39. $ref: '../../main.yaml#/components/schemas/ProblemDetails'
  40. 422:
  41. $ref: '../../main.yaml#/components/responses/ProblemValidation'
  42. patch:
  43. summary: 改成员角色
  44. tags:
  45. - groups
  46. operationId: patch_api_v3_groups_group_members_member_
  47. description: |-
  48. 团队的 owner / manager 才能调用;owner 那一行不能改。
  49. 实现:`V3\GroupMemberController@update`
  50. security:
  51. -
  52. bearerAuth: []
  53. parameters:
  54. -
  55. name: group
  56. in: path
  57. required: true
  58. schema:
  59. type: string
  60. description: '团队 uid'
  61. -
  62. name: member
  63. in: path
  64. required: true
  65. schema:
  66. type: string
  67. description: '成员记录 id'
  68. requestBody:
  69. required: false
  70. content:
  71. application/json:
  72. schema:
  73. type: object
  74. properties:
  75. role:
  76. type: string
  77. description: 角色
  78. enum:
  79. - manager
  80. - editor
  81. - reader
  82. responses:
  83. 200:
  84. description: 成功
  85. content:
  86. application/json:
  87. schema:
  88. type: object
  89. properties:
  90. data:
  91. type: object
  92. properties:
  93. id:
  94. type: string
  95. group_id:
  96. type: string
  97. role:
  98. type: string
  99. joined_at:
  100. type: string
  101. user:
  102. type: object
  103. properties:
  104. id: { type: string }
  105. nickName: { type: string }
  106. userName: { type: string }
  107. realName: { type: string }
  108. sn: { type: integer }
  109. avatar: { type: string }
  110. roles: { type: array, items: { type: string } }
  111. nullable: true
  112. 401:
  113. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
  114. 403:
  115. description: 不能管理这个团队的成员,或目标是团队拥有者
  116. content:
  117. application/problem+json:
  118. schema:
  119. $ref: '../../main.yaml#/components/schemas/ProblemDetails'
  120. 422:
  121. $ref: '../../main.yaml#/components/responses/ProblemValidation'