Skip to content

Scheduling infrastructure for absolutely everyone.

fix: add documentation to the possible values of :app in conferencing controller (#20164)

Somay Chauhan413aba6e5275
diff --git a/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.ts b/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.ts
index fead0f07e36..dd42e671b04 100644
--- a/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.ts
+++ b/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.ts
@@ -37,11 +37,11 @@ import {
Req,
HttpException,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiOperation, ApiParam, ApiTags as DocsTags } from "@nestjs/swagger";
import { plainToInstance } from "class-transformer";
import { Request } from "express";
-import { GOOGLE_MEET, ZOOM, SUCCESS_STATUS, OFFICE_365_VIDEO } from "@calcom/platform-constants";
+import { GOOGLE_MEET, ZOOM, SUCCESS_STATUS, OFFICE_365_VIDEO, CAL_VIDEO } from "@calcom/platform-constants";
export type OAuthCallbackState = {
accessToken: string;
@@ -71,6 +71,12 @@ export class ConferencingController {
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
@ApiOperation({ summary: "Connect your conferencing application" })
+ @ApiParam({
+ name: "app",
+ description: "Conferencing application type",
+ enum: [GOOGLE_MEET],
+ required: true,
+ })
async connect(
@GetUser("id") userId: number,
@Param("app") app: string
@@ -93,6 +99,12 @@ export class ConferencingController {
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
@ApiOperation({ summary: "Get OAuth conferencing app auth url" })
+ @ApiParam({
+ name: "app",
+ description: "Conferencing application type",
+ enum: [ZOOM, OFFICE_365_VIDEO],
+ required: true,
+ })
async redirect(
@Req() req: Request,
@Headers("Authorization") authorization: string,
@@ -138,6 +150,12 @@ export class ConferencingController {
@UseGuards()
@Redirect(undefined, 301)
@ApiOperation({ summary: "conferencing apps oauths callback" })
+ @ApiParam({
+ name: "app",
+ description: "Conferencing application type",
+ enum: [ZOOM, OFFICE_365_VIDEO],
+ required: true,
+ })
async save(
@Query("state") state: string,
@Param("app") app: string,
@@ -203,6 +221,12 @@ export class ConferencingController {
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
@ApiOperation({ summary: "Set your default conferencing application" })
+ @ApiParam({
+ name: "app",
+ description: "Conferencing application type",
+ enum: [GOOGLE_MEET, ZOOM, OFFICE_365_VIDEO, CAL_VIDEO],
+ required: true,
+ })
async default(
@GetUser() user: UserWithProfile,
@Param("app") app: string
@@ -224,6 +248,12 @@ export class ConferencingController {
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
@ApiOperation({ summary: "Disconnect your conferencing application" })
+ @ApiParam({
+ name: "app",
+ description: "Conferencing application type",
+ enum: [GOOGLE_MEET, ZOOM, OFFICE_365_VIDEO],
+ required: true,
+ })
async disconnect(
@GetUser() user: UserWithProfile,
@Param("app") app: string
diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json
index 6ca4ad0acd5..1103394076c 100644
--- a/apps/api/v2/swagger/documentation.json
+++ b/apps/api/v2/swagger/documentation.json
@@ -4742,7 +4742,11 @@
"name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": [
+ "google-meet"
+ ],
"type": "string"
}
}
@@ -4781,7 +4785,12 @@
"name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": [
+ "zoom",
+ "msteams"
+ ],
"type": "string"
}
},
@@ -4836,7 +4845,12 @@
"name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": [
+ "zoom",
+ "msteams"
+ ],
"type": "string"
}
},
@@ -4890,7 +4904,14 @@
"name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": [
+ "google-meet",
+ "zoom",
+ "msteams",
+ "daily-video"
+ ],
"type": "string"
}
}
@@ -4943,7 +4964,13 @@
"name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": [
+ "google-meet",
+ "zoom",
+ "msteams"
+ ],
"type": "string"
}
}
diff --git a/docs/api-reference/v2/openapi.json b/docs/api-reference/v2/openapi.json
index d6481110e19..fd2f273549a 100644
--- a/docs/api-reference/v2/openapi.json
+++ b/docs/api-reference/v2/openapi.json
@@ -4472,7 +4472,9 @@
"name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": ["google-meet"],
"type": "string"
}
}
@@ -4509,7 +4511,9 @@
"name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": ["zoom", "msteams"],
"type": "string"
}
},
@@ -4562,7 +4566,9 @@
"name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": ["zoom", "msteams"],
"type": "string"
}
},
@@ -4612,7 +4618,9 @@
"name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": ["google-meet", "zoom", "msteams", "daily-video"],
"type": "string"
}
}
@@ -4661,7 +4669,9 @@
"name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": ["google-meet", "zoom", "msteams"],
"type": "string"
}
}