Skip to content

Commit

Permalink
Add get-membership API to docs
Browse files Browse the repository at this point in the history
This adds docs for the API that was added in
#9197
  • Loading branch information
seanh committed Jan 7, 2025
1 parent 3081a7a commit 00034c6
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/_extra/api-reference/hypothesis-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,30 @@ paths:
$ref: '#/components/schemas/Membership'

/groups/{id}/members/{user}:
# ----------------------------------------------------------
# GET groups/{id}/members/{user} - Get group member
# ----------------------------------------------------------
get:
tags:
- memberships
summary: Get group member
description: Get a user's membership of a group.
Authenticated user must have read access to the group.
Does not require authentication for reading members of public groups.
security:
- ApiKey: []
- {}
parameters:
- $ref: '#/components/parameters/GroupID'
- $ref: '#/components/parameters/UserID'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Membership'

# ----------------------------------------------------------
# POST groups/{id}/members/{user} - Add user to group
# ----------------------------------------------------------
Expand Down
24 changes: 24 additions & 0 deletions docs/_extra/api-reference/hypothesis-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,30 @@ paths:
$ref: '#/components/schemas/Membership'

/groups/{id}/members/{user}:
# ----------------------------------------------------------
# GET groups/{id}/members/{user} - Get group member
# ----------------------------------------------------------
get:
tags:
- memberships
summary: Get group member
description: Fetch a user's membership of a group.
Authenticated user must have read access to the group.
Does not require authentication for reading members of public groups.
security:
- ApiKey: []
- {}
parameters:
- $ref: '#/components/parameters/GroupID'
- $ref: '#/components/parameters/UserID'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Membership'

# ----------------------------------------------------------
# POST groups/{id}/members/{user} - Add user to group
# ----------------------------------------------------------
Expand Down

0 comments on commit 00034c6

Please sign in to comment.