Merge pull request #2481 from Infisical/doc/add-groups-endpoints-to-api-reference

doc: add groups endpoints to api reference documentation
This commit is contained in:
Maidul Islam
2024-09-25 09:50:40 -04:00
committed by GitHub
16 changed files with 79 additions and 1 deletions

View File

@ -48,7 +48,7 @@ export const registerGroupRouter = async (server: FastifyZodProvider) => {
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
schema: {
params: z.object({
id: z.string()
id: z.string().trim().describe(GROUPS.GET_BY_ID.id)
}),
response: {
200: GroupsSchema

View File

@ -24,6 +24,9 @@ export const GROUPS = {
id: "The id of the group to add the user to.",
username: "The username of the user to add to the group."
},
GET_BY_ID: {
id: "The id of the group to fetch"
},
DELETE_USER: {
id: "The id of the group to remove the user from.",
username: "The username of the user to remove from the group."

View File

@ -0,0 +1,4 @@
---
title: "Add Group User"
openapi: "POST /api/v1/groups/{id}/users/{username}"
---

View File

@ -0,0 +1,4 @@
---
title: "Create"
openapi: "POST /api/v1/groups"
---

View File

@ -0,0 +1,4 @@
---
title: "Delete"
openapi: "DELETE /api/v1/groups/{id}"
---

View File

@ -0,0 +1,4 @@
---
title: "Get By ID"
openapi: "GET /api/v1/groups/{id}"
---

View File

@ -0,0 +1,4 @@
---
title: "Get Groups in Organization"
openapi: "GET /api/v1/groups"
---

View File

@ -0,0 +1,4 @@
---
title: "List Group Users"
openapi: "GET /api/v1/groups/{id}/users"
---

View File

@ -0,0 +1,4 @@
---
title: "Remove Group User"
openapi: "DELETE /api/v1/groups/{id}/users/{username}"
---

View File

@ -0,0 +1,4 @@
---
title: "Update"
openapi: "PATCH /api/v1/groups/{id}"
---

View File

@ -0,0 +1,4 @@
---
title: "Create Project Membership"
openapi: "POST /api/v2/workspace/{projectId}/groups/{groupId}"
---

View File

@ -0,0 +1,4 @@
---
title: "Delete Project Membership"
openapi: "DELETE /api/v2/workspace/{projectId}/groups/{groupId}"
---

View File

@ -0,0 +1,4 @@
---
title: "Get Project Membership"
openapi: "GET /api/v2/workspace/{projectId}/groups/{groupId}"
---

View File

@ -0,0 +1,4 @@
---
title: "List Project Memberships"
openapi: "GET /api/v2/workspace/{projectId}/groups"
---

View File

@ -0,0 +1,4 @@
---
title: "Update Project Membership"
openapi: "PATCH /api/v2/workspace/{projectId}/groups/{groupId}"
---

View File

@ -546,6 +546,19 @@
"api-reference/endpoints/oidc-auth/revoke"
]
},
{
"group": "Groups",
"pages": [
"api-reference/endpoints/groups/create",
"api-reference/endpoints/groups/update",
"api-reference/endpoints/groups/delete",
"api-reference/endpoints/groups/get",
"api-reference/endpoints/groups/get-by-id",
"api-reference/endpoints/groups/add-group-user",
"api-reference/endpoints/groups/remove-group-user",
"api-reference/endpoints/groups/list-group-users"
]
},
{
"group": "Organizations",
"pages": [
@ -577,6 +590,16 @@
"api-reference/endpoints/project-users/update-membership"
]
},
{
"group": "Project Groups",
"pages": [
"api-reference/endpoints/project-groups/create",
"api-reference/endpoints/project-groups/delete",
"api-reference/endpoints/project-groups/get-by-id",
"api-reference/endpoints/project-groups/list",
"api-reference/endpoints/project-groups/update"
]
},
{
"group": "Project Identities",
"pages": [