Skip to content

Commit d4dd5de

Browse files
committed
docs(openapi): add new membership-invitations routes
1 parent 45d02d3 commit d4dd5de

File tree

4 files changed

+126
-2
lines changed

4 files changed

+126
-2
lines changed

openapi/spec/cloud-openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,14 @@ paths:
114114
$ref: paths/api@connector@{uid}@info.yaml
115115
/api/namespaces/{tenant}/members/accept-invite:
116116
$ref: paths/api@namespaces@{tenant}@members@accept-invite.yaml
117+
/api/namespaces/{tenant}/members/decline-invite:
118+
$ref: paths/api@namespaces@{tenant}@members@decline-invite.yaml
117119
/api/namespaces/{tenant}/members/invites:
118120
$ref: paths/api@namespaces@{tenant}@members@invites.yaml
119121
/api/namespaces/{tenant}/members/{id}/accept-invite:
120122
$ref: paths/api@namespaces@{tenant}@members@{id}@accept-invite.yaml
123+
/api/namespaces/{tenant}/invitations/{user-id}:
124+
$ref: paths/api@namespaces@{tenant}@invitations@{user-id}.yaml
121125
/api/namespaces/{tenant}/support:
122126
$ref: paths/api@namespaces@{tenant}@support.yaml
123127
/api/web-endpoints:

openapi/spec/openapi.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,12 @@ paths:
233233
$ref: paths/api@connector@{uid}@info.yaml
234234
/api/namespaces/{tenant}/members/accept-invite:
235235
$ref: paths/api@namespaces@{tenant}@members@accept-invite.yaml
236+
/api/namespaces/{tenant}/members/decline-invite:
237+
$ref: paths/api@namespaces@{tenant}@members@decline-invite.yaml
236238
/api/namespaces/{tenant}/members/invites:
237239
$ref: paths/api@namespaces@{tenant}@members@invites.yaml
238-
/api/namespaces/{tenant}/members/{id}/accept-invite:
239-
$ref: paths/api@namespaces@{tenant}@members@{id}@accept-invite.yaml
240+
/api/namespaces/{tenant}/invitations/{user-id}:
241+
$ref: paths/api@namespaces@{tenant}@invitations@{user-id}.yaml
240242
/api/namespaces/{tenant}/support:
241243
$ref: paths/api@namespaces@{tenant}@support.yaml
242244
/api/web-endpoints:
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
patch:
2+
operationId: updateMembershipInvitation
3+
summary: Update a pending membership invitation
4+
description: |
5+
Allows namespace administrators to update a pending membership invitation.
6+
Currently supports updating the role assigned to the invitation.
7+
The active user must have authority over the role being assigned.
8+
tags:
9+
- cloud
10+
- members
11+
- namespaces
12+
security:
13+
- jwt: []
14+
parameters:
15+
- $ref: ../components/parameters/path/namespaceTenantIDPath.yaml
16+
- name: user-id
17+
description: The ID of the invited user
18+
schema:
19+
type: string
20+
required: true
21+
in: path
22+
requestBody:
23+
content:
24+
application/json:
25+
schema:
26+
type: object
27+
properties:
28+
role:
29+
$ref: ../components/schemas/namespaceMemberRole.yaml
30+
responses:
31+
'200':
32+
description: Invitation successfully updated
33+
'400':
34+
$ref: ../components/responses/400.yaml
35+
'401':
36+
$ref: ../components/responses/401.yaml
37+
'403':
38+
$ref: ../components/responses/403.yaml
39+
'404':
40+
$ref: ../components/responses/404.yaml
41+
'500':
42+
$ref: ../components/responses/500.yaml
43+
44+
delete:
45+
operationId: cancelMembershipInvitation
46+
summary: Cancel a pending membership invitation
47+
description: |
48+
Allows namespace administrators to cancel a pending membership invitation.
49+
The invitation status will be updated to "cancelled".
50+
The active user must have authority over the role of the invitation being cancelled.
51+
tags:
52+
- cloud
53+
- members
54+
- namespaces
55+
security:
56+
- jwt: []
57+
parameters:
58+
- $ref: ../components/parameters/path/namespaceTenantIDPath.yaml
59+
- name: user-id
60+
description: The ID of the invited user
61+
schema:
62+
type: string
63+
required: true
64+
in: path
65+
responses:
66+
'200':
67+
description: Invitation successfully cancelled
68+
'400':
69+
$ref: ../components/responses/400.yaml
70+
'401':
71+
$ref: ../components/responses/401.yaml
72+
'403':
73+
$ref: ../components/responses/403.yaml
74+
'404':
75+
$ref: ../components/responses/404.yaml
76+
'500':
77+
$ref: ../components/responses/500.yaml
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
patch:
2+
operationId: declineInvite
3+
summary: Decline a membership invite
4+
description: |
5+
This route allows an invited user to decline a pending membership invitation.
6+
The user must be logged into the account that was invited.
7+
The invitation status will be updated to "rejected".
8+
tags:
9+
- cloud
10+
- members
11+
- namespaces
12+
- users
13+
security:
14+
- jwt: []
15+
parameters:
16+
- $ref: ../components/parameters/path/namespaceTenantIDPath.yaml
17+
requestBody:
18+
content:
19+
application/json:
20+
schema:
21+
type: object
22+
properties:
23+
sig:
24+
description: The unique key included in the email link.
25+
type: string
26+
example: b25e93bc-22ac-4f02-901a-52af9f358a5d
27+
required:
28+
- sig
29+
responses:
30+
'200':
31+
description: Invitation successfully declined
32+
'400':
33+
$ref: ../components/responses/400.yaml
34+
'401':
35+
$ref: ../components/responses/401.yaml
36+
'403':
37+
$ref: ../components/responses/403.yaml
38+
'404':
39+
$ref: ../components/responses/404.yaml
40+
'500':
41+
$ref: ../components/responses/500.yaml

0 commit comments

Comments
 (0)