| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-groups-group-members.yaml
- get:
- summary: 列出团队成员
- tags:
- - groups
- operationId: get_api_v3_groups_group_members
- description: |-
- 只有团队成员看得到。owner、manager 在前,其余按加入时间排序。
- 实现:`V3\GroupMemberController@index`
- security:
- -
- bearerAuth: []
- parameters:
- -
- name: group
- in: path
- required: true
- schema:
- type: string
- description: '团队 uid'
- -
- name: per_page
- in: query
- schema:
- type: integer
- default: 100
- description: '每页数量,最大 200'
- -
- name: page
- in: query
- schema:
- type: integer
- default: 1
- description: 页码
- responses:
- 200:
- description: 成功
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- group_id:
- type: string
- role:
- type: string
- joined_at:
- type: string
- user:
- type: object
- 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 } } }
- nullable: true
- meta:
- $ref: '../../main.yaml#/components/schemas/PaginationMeta'
- 401:
- $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
- 403:
- description: 不是这个团队的成员
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
- 422:
- $ref: '../../main.yaml#/components/responses/ProblemValidation'
- post:
- summary: 加一名成员
- tags:
- - groups
- operationId: post_api_v3_groups_group_members
- description: |-
- 团队的 owner / manager 才能调用。角色默认 reader(只读)。
- 实现:`V3\GroupMemberController@store`
- security:
- -
- bearerAuth: []
- parameters:
- -
- name: group
- in: path
- required: true
- schema:
- type: string
- description: '团队 uid'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user_id:
- type: string
- description: '要加入的用户 uuid'
- role:
- type: string
- description: '角色,默认 reader'
- enum:
- - manager
- - editor
- - reader
- required:
- - user_id
- responses:
- 200:
- description: 成功
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- id:
- type: string
- group_id:
- type: string
- role:
- type: string
- joined_at:
- type: string
- user:
- type: object
- 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 } }
- nullable: true
- 201:
- description: 加入成功
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- id:
- type: string
- group_id:
- type: string
- role:
- type: string
- joined_at:
- type: string
- user:
- type: object
- 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 } }
- nullable: true
- 401:
- $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
- 403:
- description: 不能管理这个团队的成员
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
- 422:
- $ref: '../../main.yaml#/components/responses/ProblemValidation'
|