Skip to content

Comments

fix: add missing api v2 swagger DTOs#24065

Merged
supalarry merged 2 commits intomainfrom
lauris/cal-6464-add-missing-dtos
Sep 25, 2025
Merged

fix: add missing api v2 swagger DTOs#24065
supalarry merged 2 commits intomainfrom
lauris/cal-6464-add-missing-dtos

Conversation

@supalarry
Copy link
Contributor

Linear CAL-6464

@supalarry supalarry requested a review from a team September 25, 2025 07:53
@supalarry supalarry requested a review from a team as a code owner September 25, 2025 07:53
@linear
Copy link

linear bot commented Sep 25, 2025

@graphite-app graphite-app bot requested a review from a team September 25, 2025 07:53
@keithwillcode keithwillcode added core area: core, team members only platform Anything related to our platform plan labels Sep 25, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 25, 2025

Walkthrough

Multiple NestJS DTOs and output classes were updated to add ApiExtraModels decorators and corresponding imports for Swagger schema generation (bookings, unified calendar events, delegation credentials, routing-forms, team event types, and team creation output). Unused class-validator imports were removed in a couple of inputs. One reschedule-booking output import list was narrowed. OpenAPI/Swagger JSON was regenerated to include new/extended schemas (conference locations, private links, workflows, bookings, teams, organizations, and related DTOs).

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning The pull request includes removal of unused ValidateNested, plainToClass, and Transform imports which are not related to adding missing DTOs and fall outside the stated objectives of CAL-6464. Consider separating import cleanups into a follow-up pull request or confirming that these deletions are intended within the scope of adding missing DTOs.
Description Check ❓ Inconclusive The description only references the linked issue and does not convey any details about the actual changes in the pull request, making it too vague to inform reviewers about what was implemented. Please expand the description with a brief summary of the key code changes and their purpose to provide context for reviewers.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title concisely describes the primary change of adding missing API v2 Swagger DTOs and aligns with the Conventional Commits style, making it clear and specific to the changeset.
Linked Issues Check ✅ Passed The pull request implements the objective of CAL-6464 by adding the missing API v2 Swagger DTO definitions across the codebase and documentation, satisfying the requirements identified by the CI breaking changes tool.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch lauris/cal-6464-add-missing-dtos

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dosubot dosubot bot added api area: API, enterprise API, access token, OAuth 🐛 bug Something isn't working labels Sep 25, 2025
@supalarry supalarry enabled auto-merge (squash) September 25, 2025 07:55
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 28

🧹 Nitpick comments (15)
apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts (1)

17-20: Add Type() for nested TeamOutputDto

Without @type, class-transformer won’t instantiate nested pendingTeam. Add @type(() => TeamOutputDto).

Apply:

   @Expose()
   @ValidateNested()
+  @Type(() => TeamOutputDto)
   pendingTeam!: TeamOutputDto;

Also ensure the import includes Type:

import { Expose, Type } from "class-transformer";
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1)

7-8: Combine Swagger imports to a single statement

Minor cleanup to avoid duplicate import lines from @nestjs/swagger.

Replace the two lines with:

import { ApiProperty, getSchemaPath, ApiExtraModels } from "@nestjs/swagger";
apps/api/v2/swagger/documentation.json (2)

25869-25876: Empty SlotsOutput/RangeSlotsOutput schemas: consider defining shape or referencing existing slot DTOs.

Empty objects limit client usefulness and typed SDKs.

If placeholders, annotate with description or add $ref to concrete slot item schemas used elsewhere (e.g., per‑day slot arrays, metadata).


29306-29454: Add validation formats to URL/phone fields in calendar location schemas.

Improves client validation and generated types.

       "CalendarEventVideoLocation": {
         "type": "object",
         "properties": {
           "type": {
             "type": "string",
             "default": "video",
             "enum": ["video"],
             "description": "Indicates this is a video conference location"
           },
           "url": {
             "type": "string",
+            "format": "uri",
             "description": "URL for joining the video conference"
           },
...
       "CalendarEventPhoneLocation": {
...
           "url": {
             "type": "string",
-            "description": "Phone number or URL for dialing into the conference"
+            "description": "E.164 phone number for dialing into the conference",
+            "pattern": "^\\+?[1-9]\\d{1,14}$"
           },
...
       "CalendarEventSipLocation": {
...
           "url": {
             "type": "string",
+            "format": "uri",
             "description": "SIP URL for joining the conference"
           },
...
       "CalendarEventMoreLocation": {
...
           "url": {
             "type": "string",
+            "format": "uri",
             "description": "URL for accessing this location"
           },
docs/api-reference/v2/openapi.json (11)

15841-15841: Capitalize “API” in description

Prefer “via API” over “via api” for consistency.

- "description": "Boolean to require authentication for booking this event type via api. If true, only authenticated users who are the event-type owner or org/team admin/owner can book this event type."
+ "description": "Boolean to require authentication for booking this event type via API. If true, only authenticated users who are the event-type owner or org/team admin/owner can book this event type."

17031-17031: Capitalize “API” in description

Same wording nit as earlier.

- "via api."
+ "via API."

17368-17368: Capitalize “API” in description

Same wording nit as earlier.

- "via api."
+ "via API."

18939-18939: Capitalize “API” in description

Same wording nit as earlier.

- "via api."
+ "via API."

19052-19052: Prefer integer for minute-based options

Minutes are integral; use type "integer".

- "type": "number"
+ "type": "integer"

19264-19265: Prefer integer for offsetStart

Offsets are integral.

- "type": "number"
+ "type": "integer"

19738-19738: Capitalize “API” in description

Same wording nit as earlier.

- "via api."
+ "via API."

22567-22603: Good structure; consider discriminator for oneOf

OneOf branches are distinct; adding a discriminator could improve codegen.

 "data": {
   "oneOf": [
     { "$ref": "#/components/schemas/CreateTeamOutputData" },
     { "$ref": "#/components/schemas/TeamOutputDto" }
-  ],
-  "description": "Either an Output object or a TeamOutputDto."
+  ],
+  "description": "Either an Output object or a TeamOutputDto.",
+  "discriminator": {
+    "propertyName": "type",
+    "mapping": {
+      "createTeamOutputData": "#/components/schemas/CreateTeamOutputData",
+      "teamOutput": "#/components/schemas/TeamOutputDto"
+    }
+  }
 }

If a discriminator isn’t feasible, consider explicit examples for both branches.


22776-22790: LGTM; consider adding formats/descriptions

Schema is fine. Optionally add descriptions and validation (e.g., minLength) for keys.


23600-23607: Empty schemas: define shape or remove placeholders

Empty objects hinder client usefulness. If unknown, document with description or add fields.

For example:

- "SlotsOutput_2024_09_04": { "type": "object", "properties": {} }
+ "SlotsOutput_2024_09_04": {
+   "type": "object",
+   "properties": {
+     "slots": {
+       "type": "array",
+       "items": { "type": "string", "format": "date-time" }
+     }
+   },
+   "required": ["slots"]
+ }

Apply similarly to RangeSlotsOutput_2024_09_04.


26650-26778: Add URI formats to URL-like fields

Add "format": "uri" for url fields to improve validation and client generation.

Examples:

- "url": {
-   "type": "string",
-   "description": "URL for joining the video conference"
- },
+ "url": {
+   "type": "string",
+   "format": "uri",
+   "description": "URL for joining the video conference"
+ },

Apply to all CalendarEvent*Location.url fields. Optionally add minLength: 1 to required string fields.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2ed0380 and 2e21f9a.

📒 Files selected for processing (11)
  • apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts (1 hunks)
  • apps/api/v2/src/ee/bookings/2024-08-13/outputs/reschedule-booking.output.ts (0 hunks)
  • apps/api/v2/src/modules/cal-unified-calendars/outputs/get-unified-calendar-event.output.ts (2 hunks)
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/routing-forms/outputs/create-routing-form-response.output.ts (2 hunks)
  • apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts (1 hunks)
  • apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts (1 hunks)
  • apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts (2 hunks)
  • apps/api/v2/swagger/documentation.json (37 hunks)
  • docs/api-reference/v2/openapi.json (40 hunks)
💤 Files with no reviewable changes (1)
  • apps/api/v2/src/ee/bookings/2024-08-13/outputs/reschedule-booking.output.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

**/*.ts: For Prisma queries, only select data you need; never use include, always use select
Ensure the credential.key field is never returned from tRPC endpoints or APIs

Files:

  • apps/api/v2/src/modules/cal-unified-calendars/outputs/get-unified-calendar-event.output.ts
  • apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts
  • apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts
  • apps/api/v2/src/modules/organizations/routing-forms/outputs/create-routing-form-response.output.ts
  • apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts
  • apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js .utc() in hot paths like loops

Files:

  • apps/api/v2/src/modules/cal-unified-calendars/outputs/get-unified-calendar-event.output.ts
  • apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts
  • apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts
  • apps/api/v2/src/modules/organizations/routing-forms/outputs/create-routing-form-response.output.ts
  • apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts
  • apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts
**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

Flag default exports and encourage named exports. Named exports provide better tree-shaking, easier refactoring, and clearer imports. Exempt main components like pages, layouts, and components that serve as the primary export of a module.

Files:

  • apps/api/v2/src/modules/cal-unified-calendars/outputs/get-unified-calendar-event.output.ts
  • apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts
  • apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts
  • apps/api/v2/src/modules/organizations/routing-forms/outputs/create-routing-form-response.output.ts
  • apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts
  • apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts
docs/api-reference/v2/openapi.json

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

When docs changes are made in /docs/api-reference/v2/openapi.json, ensure 'summary' fields are short, concise, do not end with a period, and are written in proper American English

Files:

  • docs/api-reference/v2/openapi.json
🧠 Learnings (2)
📓 Common learnings
Learnt from: supalarry
PR: calcom/cal.com#23364
File: apps/api/v2/src/ee/event-types/event-types_2024_06_14/transformers/internal-to-api/internal-to-api.spec.ts:295-296
Timestamp: 2025-08-27T13:32:46.887Z
Learning: In calcom/cal.com, when transforming booking fields from internal to API format, tests in organizations-event-types.e2e-spec.ts already expect name field label and placeholder to be empty strings ("") rather than undefined. PR changes that set these to explicit empty strings are typically fixing implementation to match existing test expectations rather than breaking changes.
📚 Learning: 2025-08-21T12:28:42.018Z
Learnt from: alishaz-polymath
PR: calcom/cal.com#23247
File: packages/features/webhooks/lib/factory/WebhookPayloadFactory.ts:274-282
Timestamp: 2025-08-21T12:28:42.018Z
Learning: In webhook DTOs in packages/features/webhooks/lib/dto/types.ts, the booking fields are restricted structures containing only specific fields (id, eventTypeId, userId, and sometimes additional fields like startTime or smsReminderNumber) rather than full database booking objects, so there are no security or PII leakage concerns when using these booking objects in webhook payloads.

Applied to files:

  • docs/api-reference/v2/openapi.json
🧬 Code graph analysis (8)
apps/api/v2/src/modules/cal-unified-calendars/outputs/get-unified-calendar-event.output.ts (2)
apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts (1)
  • ApiExtraModels (8-22)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1)
  • ApiExtraModels (11-38)
apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts (2)
apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts (1)
  • ApiExtraModels (7-22)
packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.ts (1)
  • TeamEventTypeOutput_2024_06_14 (486-529)
apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts (3)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1)
  • ApiExtraModels (11-38)
apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts (1)
  • ApiExtraModels (22-35)
apps/api/v2/src/ee/bookings/2024-08-13/outputs/reschedule-booking.output.ts (1)
  • ApiExtraModels (13-41)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts (1)
  • ApiExtraModels (10-30)
apps/api/v2/src/modules/organizations/routing-forms/outputs/create-routing-form-response.output.ts (2)
apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts (1)
  • ApiExtraModels (8-22)
apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts (1)
  • ApiExtraModels (22-35)
apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts (2)
apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts (1)
  • ApiExtraModels (8-22)
apps/api/v2/src/ee/bookings/2024-08-13/outputs/reschedule-booking.output.ts (1)
  • ApiExtraModels (13-41)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts (1)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1)
  • ApiExtraModels (11-38)
apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts (2)
apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts (1)
  • ApiExtraModels (7-22)
packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.ts (1)
  • TeamEventTypeOutput_2024_06_14 (486-529)
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Install dependencies / Yarn install & cache
🔇 Additional comments (27)
apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts (1)

7-7: Swagger model registration is correct

Adding @ApiExtraModels(TeamEventTypeOutput_2024_06_14) ensures the oneOf refs resolve in the schema.

apps/api/v2/src/modules/organizations/routing-forms/outputs/create-routing-form-response.output.ts (1)

78-78: Good use of ApiExtraModels for union slots

Registering SlotsOutput_2024_09_04 and RangeSlotsOutput_2024_09_04 fixes schema refs for the oneOf.

apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts (1)

7-7: Consistent ApiExtraModels usage

Matches the update output; Swagger will now include TeamEventTypeOutput_2024_06_14 in oneOf refs.

apps/api/v2/src/modules/cal-unified-calendars/outputs/get-unified-calendar-event.output.ts (2)

1-1: Import update is correct

Including ApiExtraModels matches the decorator usage later in the file.


300-305: ApiExtraModels properly registers location subtypes

This enables correct oneOf schemas for locations and improves client codegen.

apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts (1)

22-22: ApiExtraModels covers both union members

Correctly registers CreateTeamOutputData and TeamOutputDto for schema refs.

apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts (1)

10-10: Correctly registers serviceAccountKey union inputs

@ApiExtraModels(GoogleServiceAccountKeyInput, MicrosoftServiceAccountKeyInput) ensures oneOf refs resolve.

apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1)

11-11: Good: ApiExtraModels for union input

Swagger can now resolve the Google/Microsoft serviceAccountKey union.

apps/api/v2/swagger/documentation.json (10)

16867-16878: Enum addition for integration looks good.


16903-16909: Enum tail looks consistent.


17011-17018: Verify newly required fields (label, placeholder, hidden) match DTOs.

Requiring these is fine if DTOs always include them (even as empty strings). Cross-check DTO decorators; otherwise clients will fail validation.

Note: Prior org event‑types tests expect empty strings for label/placeholder; ensure the DTOs align with that behavior.

Also applies to: 17052-17059, 17093-17098, 17311-17319, 17459-17467, 17563-17571, 17612-17620, 17659-17667, 17773-17781


20463-20467: Item type is correctly numeric.


20678-20679: offsetStart numeric LGTM.


20770-20799: CreateTeamEventTypeOutput looks good; confirm runtime shape (single vs array).

Ensure controllers consistently return either a single item or an array to satisfy the oneOf.


24568-24569: String name type LGTM.


24597-24599: hideBookATeamMember boolean LGTM.


24636-24682: CreateTeamOutputData/Output structure LGTM; check backward compatibility.

If previous responses returned TeamOutputDto directly, this oneOf preserves compatibility; verify SDKs/types consume both shapes.


24913-24931: MicrosoftServiceAccountKeyInput LGTM.

Names and requireds are clear.

docs/api-reference/v2/openapi.json (9)

15921-15921: LGTM: example value

Example "cal-video" aligns with enum values.


15952-15952: LGTM

Enum list closure is correct.


16112-16112: LGTM: required keys

Required list is consistent with properties.


19024-19034: Double-check added required fields for backward compatibility

Adding many required properties can break clients and sample payloads if fields are omitted.

Please confirm these are truly always present at runtime and in all responses (including legacy/org/team contexts). If not, consider making some optional.


19344-19346: LGTM: required additions

Including hidden and bookingRequiresAuthentication in required aligns with newly modeled fields.


19352-19375: LGTM: CreateTeamEventTypeOutput oneOf

Good use of oneOf to support single or array responses.


22503-22503: LGTM

Type for name as string is correct.


22533-22534: LGTM

Boolean type for hideBookATeamMember is correct.


16143-16144: Fix schema type: isDefault must be boolean

Same correction required.

- "type": "object",
+ "type": "boolean",

Likely an incorrect or invalid review comment.

Comment on lines +16725 to +16726
"example": false,
"default": false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix schema type: isDefault must be boolean

Same correction required.

- "type": "object",
+ "type": "boolean",

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In docs/api-reference/v2/openapi.json around lines 16725-16726, the schema
property "isDefault" needs to explicitly be typed as boolean; update the
property to include "type": "boolean" and ensure its "example" and "default" are
boolean literals (true/false), and apply the same change to any other
occurrences of "isDefault" in the file so the OpenAPI schema correctly
identifies it as a boolean.

Comment on lines +16766 to +16767
"example": false,
"default": false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix schema type: isDefault must be boolean

Same correction required.

- "type": "object",
+ "type": "boolean",

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In docs/api-reference/v2/openapi.json around lines 16766 to 16767, the schema
for the isDefault property must be corrected to a boolean type; update the
property to include "type": "boolean" (and remove any incorrect string/other
type), and ensure the "example" and "default" values are real booleans (false)
not strings so the schema and examples are consistent.

Comment on lines +19160 to 19163
"type": "object",
"example": 60,
"nullable": true
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Wrong type: slotInterval should be numeric, not object

It represents minutes; set integer (nullable).

- "slotInterval": {
-   "type": "object",
-   "example": 60,
-   "nullable": true
- },
+ "slotInterval": {
+   "type": "integer",
+   "example": 60,
+   "nullable": true
+ },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"type": "object",
"example": 60,
"nullable": true
},
"slotInterval": {
"type": "integer",
"example": 60,
"nullable": true
},
🤖 Prompt for AI Agents
In docs/api-reference/v2/openapi.json around lines 19160 to 19163 the schema for
slotInterval incorrectly uses "type": "object" while the example is a numeric
minute value; change the schema type to "integer" (keep "nullable": true and the
numeric example) and optionally add "format": "int32" to indicate an integer
minute value.

Comment on lines +19197 to 19207
"type": "object",
"nullable": true
},
"forwardParamsSuccessRedirect": {
"type": "boolean",
"type": "object",
"nullable": true
},
"successRedirectUrl": {
"type": "string",
"type": "object",
"nullable": true
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Wrong types: several fields incorrectly set to object

  • seatsPerTimeSlot: integer (nullable)
  • forwardParamsSuccessRedirect: boolean (nullable)
  • successRedirectUrl: string (uri, nullable)
- "seatsPerTimeSlot": {
-   "type": "object",
-   "nullable": true
- },
+ "seatsPerTimeSlot": {
+   "type": "integer",
+   "nullable": true
+ },
- "forwardParamsSuccessRedirect": {
-   "type": "object",
-   "nullable": true
- },
+ "forwardParamsSuccessRedirect": {
+   "type": "boolean",
+   "nullable": true
+ },
- "successRedirectUrl": {
-   "type": "object",
-   "nullable": true
- },
+ "successRedirectUrl": {
+   "type": "string",
+   "format": "uri",
+   "nullable": true
+ },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"type": "object",
"nullable": true
},
"forwardParamsSuccessRedirect": {
"type": "boolean",
"type": "object",
"nullable": true
},
"successRedirectUrl": {
"type": "string",
"type": "object",
"nullable": true
},
"seatsPerTimeSlot": {
"type": "integer",
"nullable": true
},
"forwardParamsSuccessRedirect": {
"type": "boolean",
"nullable": true
},
"successRedirectUrl": {
"type": "string",
"format": "uri",
"nullable": true
},
🤖 Prompt for AI Agents
In docs/api-reference/v2/openapi.json around lines 19197 to 19207, several
schema properties have incorrect types: change "seatsPerTimeSlot" from type
object to type integer with "nullable": true, change
"forwardParamsSuccessRedirect" from object to type boolean with "nullable":
true, and change "successRedirectUrl" from object to type string, add "format":
"uri" and "nullable": true; update the schema entries accordingly so each
property reflects the correct type, format, and nullable setting.

Comment on lines +19295 to 19313
"description": "Boolean to require authentication for booking this event type via api. If true, only authenticated users who are the event-type owner or org/team admin/owner can book this event type."
},
"teamId": {
"type": "number"
},
"ownerId": {
"type": "number",
"type": "object",
"nullable": true
},
"parentEventTypeId": {
"type": "number",
"nullable": true,
"description": "For managed event types, parent event type is the event type that this event type is based on"
"type": "object",
"description": "For managed event types, parent event type is the event type that this event type is based on",
"nullable": true
},
"hosts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TeamEventTypeResponseHost"
"type": "string"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Wrong/unclear types: ownerId/parentEventTypeId/hosts

  • ownerId, parentEventTypeId: likely numeric IDs, not objects.
  • hosts items: likely numeric IDs or objects; "string" seems off.

Proposed fix (assuming numeric IDs and host IDs):

- "ownerId": {
-   "type": "object",
-   "nullable": true
- },
+ "ownerId": {
+   "type": "number",
+   "nullable": true
+ },
- "parentEventTypeId": {
-   "type": "object",
-   "description": "For managed event types, parent event type is the event type that this event type is based on",
-   "nullable": true
- },
+ "parentEventTypeId": {
+   "type": "number",
+   "description": "For managed event types, parent event type is the event type that this event type is based on",
+   "nullable": true
+ },
- "hosts": {
-   "type": "array",
-   "items": { "type": "string" }
- },
+ "hosts": {
+   "type": "array",
+   "items": { "type": "number" }
+ },

If hosts are objects, please reference the correct schema instead.


#!/bin/bash

Locate the start of the EventType schema and dump the next 400 lines for context

start=$(rg -n '"EventType":\s*{' docs/api-reference/v2/openapi.json | head -1 | cut -d: -f1)
sed -n "${start},$((start+400))p" docs/api-reference/v2/openapi.json


#!/bin/bash

Inspect ownerId, parentEventTypeId, and hosts definitions

rg -nC2 '"ownerId"\s*:' docs/api-reference/v2/openapi.json
rg -nC2 '"parentEventTypeId"\s*:' docs/api-reference/v2/openapi.json
rg -nC2 '"hosts"\s*:' docs/api-reference/v2/openapi.json

Check if a Host schema exists in components/schemas

rg -nP '"Host":\s*{' -C2 docs/api-reference/v2/openapi.json


🏁 Script executed:

#!/bin/bash
set -e

echo "=== ownerId definition ==="
rg -C2 '"ownerId"' docs/api-reference/v2/openapi.json

echo "=== parentEventTypeId definition ==="
rg -C2 '"parentEventTypeId"' docs/api-reference/v2/openapi.json

echo "=== hosts definition ==="
rg -C3 '"hosts":' docs/api-reference/v2/openapi.json

echo "=== components.schemas.Host definition ==="
rg -nP '"Host":\s*\{' -C2 docs/api-reference/v2/openapi.json || echo "No Host schema found"

Length of output: 4309


🏁 Script executed:

#!/bin/bash
# Dump context around lines 19295-19313 to identify the enclosing schema
sed -n '19280,19350p' docs/api-reference/v2/openapi.json

Length of output: 2214


#!/bin/bash

Show lines leading up to this schema to identify its name

sed -n '19250,19295p' docs/api-reference/v2/openapi.json


Correct ownerId, parentEventTypeId, and hosts types

  • Change ownerId and parentEventTypeId from object to number (nullable).
  • Change hosts items type from string to number.
-  "ownerId": {
-    "type": "object",
-    "nullable": true
-  },
+  "ownerId": {
+    "type": "number",
+    "nullable": true
+  },
-  "parentEventTypeId": {
-    "type": "object",
-    "description": "For managed event types, parent event type is the event type that this event type is based on",
-    "nullable": true
-  },
+  "parentEventTypeId": {
+    "type": "number",
+    "description": "For managed event types, parent event type is the event type that this event type is based on",
+    "nullable": true
+  },
-  "hosts": {
-    "type": "array",
-    "items": { "type": "string" }
-  },
+  "hosts": {
+    "type": "array",
+    "items": { "type": "number" }
+  },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"description": "Boolean to require authentication for booking this event type via api. If true, only authenticated users who are the event-type owner or org/team admin/owner can book this event type."
},
"teamId": {
"type": "number"
},
"ownerId": {
"type": "number",
"type": "object",
"nullable": true
},
"parentEventTypeId": {
"type": "number",
"nullable": true,
"description": "For managed event types, parent event type is the event type that this event type is based on"
"type": "object",
"description": "For managed event types, parent event type is the event type that this event type is based on",
"nullable": true
},
"hosts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TeamEventTypeResponseHost"
"type": "string"
}
"description": "Boolean to require authentication for booking this event type via api. If true, only authenticated users who are the event-type owner or org/team admin/owner can book this event type."
},
"teamId": {
"type": "number"
},
"ownerId": {
"type": "number",
"nullable": true
},
"parentEventTypeId": {
"type": "number",
"description": "For managed event types, parent event type is the event type that this event type is based on",
"nullable": true
},
"hosts": {
"type": "array",
"items": {
"type": "number"
}
},
🤖 Prompt for AI Agents
In docs/api-reference/v2/openapi.json around lines 19295 to 19313, the schema
types are incorrect: change "ownerId" and "parentEventTypeId" from "type":
"object" to "type": "number" and ensure "nullable": true remains for both,
keeping the existing description for parentEventTypeId; also change the "hosts"
array item type from "string" to "number" so hosts items are numeric IDs.

@vercel
Copy link

vercel bot commented Sep 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
cal Ignored Ignored Sep 25, 2025 8:07am
cal-eu Ignored Ignored Sep 25, 2025 8:07am

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (13)
apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts (2)

8-20: Add @type(() => TeamOutputDto) for nested validation/serialization.

pendingTeam uses ValidateNested but lacks Type; without it, class-transformer won’t instantiate the nested DTO.

Apply within this block:

   @Expose()
   @ValidateNested()
+  @Type(() => TeamOutputDto)
   pendingTeam!: TeamOutputDto;

Also add the missing import:

// at import line with class-transformer
import { Expose, Type } from "class-transformer";

22-35: Align union handling and docs; add Type(() => Object) and fix description.

To match other union DTOs, add Type(() => Object). Also update the description to reference CreateTeamOutputData (not “Output”).

 @ApiExtraModels(TeamOutputDto, CreateTeamOutputData)
 export class CreateTeamOutput {
@@
   @ApiProperty({
-    oneOf: [{ $ref: getSchemaPath(CreateTeamOutputData) }, { $ref: getSchemaPath(TeamOutputDto) }],
-    description: "Either an Output object or a TeamOutputDto.",
+    oneOf: [{ $ref: getSchemaPath(CreateTeamOutputData) }, { $ref: getSchemaPath(TeamOutputDto) }],
+    description: "Either a CreateTeamOutputData object or a TeamOutputDto.",
   })
   @Expose()
   @ValidateNested()
-  data!: CreateTeamOutputData | TeamOutputDto;
+  @Type(() => Object)
+  data!: CreateTeamOutputData | TeamOutputDto;

Please confirm the previous schema used “Output” as the wrapper name and that renaming to CreateTeamOutputData won’t be flagged by the breaking‑changes tool. If needed, add ApiExtraModels to register both names or keep the old class name as a deprecated alias to avoid external client breakage.

docs/api-reference/v2/openapi.json (11)

15841-15841: Tighten description; capitalize API

Suggest shorter, clearer phrasing and capitalize API.

-            "description": "Boolean to require authentication for booking this event type via api. If true, only authenticated users who are the event-type owner or org/team admin/owner can book this event type."
+            "description": "Require authentication to book this event type via API; when true, only authenticated owners or org/team admins can book"

17031-17031: Tighten description; capitalize API

Same suggestion as earlier instances.

-            "description": "Boolean to require authentication for booking this event type via api. If true, only authenticated users who are the event-type owner or org/team admin/owner can book this event type."
+            "description": "Require authentication to book this event type via API; when true, only authenticated owners or org/team admins can book"

17368-17368: Tighten description; capitalize API

Apply same description fix for consistency.

-            "description": "Boolean to require authentication for booking this event type via api. If true, only authenticated users who are the event-type owner or org/team admin/owner can book this event type."
+            "description": "Require authentication to book this event type via API; when true, only authenticated owners or org/team admins can book"

18939-18939: Tighten description; capitalize API

Same description improvement.

-            "description": "Boolean to require authentication for booking this event type via api. If true, only authenticated users who are the event-type owner or org/team admin/owner can book this event type."
+            "description": "Require authentication to book this event type via API; when true, only authenticated owners or org/team admins can book"

19052-19052: Use integer for minute-based options

Minutes should be integers, not generic numbers.

-              "type": "number"
+              "type": "integer",
+              "format": "int32"

19264-19265: Prefer integer for offsets

Offsets are typically integral.

-          "offsetStart": {
-            "type": "number"
-          },
+          "offsetStart": {
+            "type": "integer",
+            "format": "int32"
+          },

19738-19738: Tighten description; capitalize API

Same text polish as earlier.

-            "description": "Boolean to require authentication for booking this event type via api. If true, only authenticated users who are the event-type owner or org/team admin/owner can book this event type."
+            "description": "Require authentication to book this event type via API; when true, only authenticated owners or org/team admins can book"

22567-22603: LGTM: CreateTeamOutputData/CreateTeamOutput added

Shapes look sound. Optionally add brief descriptions for message/paymentLink later.


22776-22790: Mark secrets as writeOnly and password formatted

Avoid exposing sensitive values in generated clients/docs.

       "MicrosoftServiceAccountKeyInput": {
         "type": "object",
         "properties": {
           "private_key": {
-            "type": "string"
+            "type": "string",
+            "format": "password",
+            "writeOnly": true
           },
           "tenant_id": {
-            "type": "string"
+            "type": "string",
+            "writeOnly": true
           },
           "client_id": {
-            "type": "string"
+            "type": "string",
+            "writeOnly": true
           }
         },
         "required": ["private_key", "tenant_id", "client_id"]
       },

23600-23607: Empty schemas: add description or real shape

Empty objects hinder client usefulness. If shapes are TBD, add description; otherwise reference actual slot output schemas.

-      "SlotsOutput_2024_09_04": {
-        "type": "object",
-        "properties": {}
-      },
+      "SlotsOutput_2024_09_04": {
+        "type": "object",
+        "description": "Time slots response payload",
+        "properties": {}
+      },
-      "RangeSlotsOutput_2024_09_04": {
-        "type": "object",
-        "properties": {}
-      },
+      "RangeSlotsOutput_2024_09_04": {
+        "type": "object",
+        "description": "Range-based time slots response payload",
+        "properties": {}
+      },

26650-26778: Add format hints for URLs; clarify phone field

Improve validation and client generation.

           "url": {
-            "type": "string",
+            "type": "string",
+            "format": "uri",
             "description": "URL for joining the video conference"
           },
...
           "url": {
-            "type": "string",
-            "description": "Phone number or URL for dialing into the conference"
+            "type": "string",
+            "description": "Phone number (E.164) or tel: URI for dialing into the conference"
           },
...
           "url": {
-            "type": "string",
+            "type": "string",
+            "format": "uri",
             "description": "SIP URL for joining the conference"
           },
...
           "url": {
-            "type": "string",
+            "type": "string",
+            "format": "uri",
             "description": "URL for accessing this location"
           },
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8d7cdf9 and 30a4805.

📒 Files selected for processing (11)
  • apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts (1 hunks)
  • apps/api/v2/src/ee/bookings/2024-08-13/outputs/reschedule-booking.output.ts (0 hunks)
  • apps/api/v2/src/modules/cal-unified-calendars/outputs/get-unified-calendar-event.output.ts (2 hunks)
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/routing-forms/outputs/create-routing-form-response.output.ts (2 hunks)
  • apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts (1 hunks)
  • apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts (1 hunks)
  • apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts (2 hunks)
  • apps/api/v2/swagger/documentation.json (37 hunks)
  • docs/api-reference/v2/openapi.json (40 hunks)
💤 Files with no reviewable changes (1)
  • apps/api/v2/src/ee/bookings/2024-08-13/outputs/reschedule-booking.output.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

**/*.ts: For Prisma queries, only select data you need; never use include, always use select
Ensure the credential.key field is never returned from tRPC endpoints or APIs

Files:

  • apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts
  • apps/api/v2/src/modules/cal-unified-calendars/outputs/get-unified-calendar-event.output.ts
  • apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts
  • apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts
  • apps/api/v2/src/modules/organizations/routing-forms/outputs/create-routing-form-response.output.ts
  • apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js .utc() in hot paths like loops

Files:

  • apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts
  • apps/api/v2/src/modules/cal-unified-calendars/outputs/get-unified-calendar-event.output.ts
  • apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts
  • apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts
  • apps/api/v2/src/modules/organizations/routing-forms/outputs/create-routing-form-response.output.ts
  • apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts
**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

Flag default exports and encourage named exports. Named exports provide better tree-shaking, easier refactoring, and clearer imports. Exempt main components like pages, layouts, and components that serve as the primary export of a module.

Files:

  • apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts
  • apps/api/v2/src/modules/cal-unified-calendars/outputs/get-unified-calendar-event.output.ts
  • apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts
  • apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts
  • apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts
  • apps/api/v2/src/modules/organizations/routing-forms/outputs/create-routing-form-response.output.ts
  • apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts
docs/api-reference/v2/openapi.json

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

When docs changes are made in /docs/api-reference/v2/openapi.json, ensure 'summary' fields are short, concise, do not end with a period, and are written in proper American English

Files:

  • docs/api-reference/v2/openapi.json
🧠 Learnings (2)
📓 Common learnings
Learnt from: alishaz-polymath
PR: calcom/cal.com#23247
File: packages/features/webhooks/lib/factory/WebhookPayloadFactory.ts:274-282
Timestamp: 2025-08-21T12:28:42.018Z
Learning: In webhook DTOs in packages/features/webhooks/lib/dto/types.ts, the booking fields are restricted structures containing only specific fields (id, eventTypeId, userId, and sometimes additional fields like startTime or smsReminderNumber) rather than full database booking objects, so there are no security or PII leakage concerns when using these booking objects in webhook payloads.
📚 Learning: 2025-08-21T12:28:42.018Z
Learnt from: alishaz-polymath
PR: calcom/cal.com#23247
File: packages/features/webhooks/lib/factory/WebhookPayloadFactory.ts:274-282
Timestamp: 2025-08-21T12:28:42.018Z
Learning: In webhook DTOs in packages/features/webhooks/lib/dto/types.ts, the booking fields are restricted structures containing only specific fields (id, eventTypeId, userId, and sometimes additional fields like startTime or smsReminderNumber) rather than full database booking objects, so there are no security or PII leakage concerns when using these booking objects in webhook payloads.

Applied to files:

  • docs/api-reference/v2/openapi.json
🧬 Code graph analysis (8)
apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts (3)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1)
  • ApiExtraModels (11-38)
apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts (1)
  • ApiExtraModels (22-35)
apps/api/v2/src/ee/bookings/2024-08-13/outputs/reschedule-booking.output.ts (1)
  • ApiExtraModels (13-41)
apps/api/v2/src/modules/cal-unified-calendars/outputs/get-unified-calendar-event.output.ts (3)
apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts (1)
  • ApiExtraModels (8-22)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1)
  • ApiExtraModels (11-38)
apps/api/v2/src/ee/bookings/2024-08-13/outputs/reschedule-booking.output.ts (1)
  • ApiExtraModels (13-41)
apps/api/v2/src/modules/teams/teams/outputs/teams/create-team.output.ts (2)
apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts (1)
  • ApiExtraModels (8-22)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1)
  • ApiExtraModels (11-38)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts (1)
  • ApiExtraModels (10-30)
apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts (2)
apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts (1)
  • ApiExtraModels (7-22)
packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.ts (1)
  • TeamEventTypeOutput_2024_06_14 (486-529)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts (1)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1)
  • ApiExtraModels (11-38)
apps/api/v2/src/modules/organizations/routing-forms/outputs/create-routing-form-response.output.ts (2)
apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts (1)
  • ApiExtraModels (8-22)
apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (1)
  • ApiExtraModels (11-38)
apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts (2)
apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts (1)
  • ApiExtraModels (7-22)
packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.ts (1)
  • TeamEventTypeOutput_2024_06_14 (486-529)
🔇 Additional comments (44)
apps/api/v2/src/modules/teams/event-types/outputs/update-team-event-type.output.ts (1)

1-21: Swagger registration for nested team event type looks good.

Line 7 ensures TeamEventTypeOutput_2024_06_14 is explicitly registered for this response wrapper, keeping the update and create flows aligned and preventing missing-schema warnings.

apps/api/v2/src/ee/bookings/2024-08-13/outputs/reassign-booking.output.ts (1)

8-21: Rename wrapper to prevent Swagger schema collision.

Line 9 reuses the constructor name ReassignBookingOutput_2024_08_13, which already belongs to the imported data class. Even though it is aliased locally, the underlying class names collide, and the new @ApiExtraModels registration now causes Swagger to overwrite one schema with the other. Please give the wrapper its own name.

-@ApiExtraModels(ReassignBookingOutputData_2024_08_13)
-export class ReassignBookingOutput_2024_08_13 {
+@ApiExtraModels(ReassignBookingOutputData_2024_08_13)
+export class ReassignBookingApiOutput_2024_08_13 {

Remember to update every reference to the renamed class across controllers, services, and tests.

apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts (1)

6-29: Extra models decorator matches the create input contract.

Lines 10-29 now mirror the create-input metadata so Swagger can surface both Google and Microsoft key shapes for updates as well. Looks consistent.

apps/api/v2/src/modules/organizations/routing-forms/outputs/create-routing-form-response.output.ts (1)

1-132: Union slot outputs are now discoverable.

Lines 78-131 properly register SlotsOutput_2024_09_04 and RangeSlotsOutput_2024_09_04, so the slots field’s oneOf renders without missing-model warnings. All good.

apps/api/v2/src/modules/cal-unified-calendars/outputs/get-unified-calendar-event.output.ts (1)

1-436: Conference location polymorphism wired for Swagger.

Lines 300-383 add the @ApiExtraModels coverage the discriminator expects, so the various location shapes now show up correctly in the docs. Nicely done.

apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts (2)

11-11: Good: extra models registered for Swagger union.

Registering Google/Microsoft inputs via ApiExtraModels ensures the oneOf refs resolve in the spec.


25-37: serviceAccountKey not exposed in API responses Verified that DelegationCredentialOutput omits serviceAccountKey, list handlers call ensureNoServiceAccountKey, and no console/log references of the secret exist.

apps/api/v2/src/modules/teams/event-types/outputs/create-team-event-type.output.ts (1)

7-7: LGTM: ApiExtraModels added.

This mirrors update-team-event-type; needed so the oneOf $refs resolve.

apps/api/v2/swagger/documentation.json (6)

17001-17005: Restore boolean schema for default isDefault fields

These DTOs still expose isDefault as a generic object, which breaks generated clients expecting a boolean flag. Please flip every default-field occurrence back to "type": "boolean" (keep description/example/default).

-          "isDefault": {
-            "type": "object",
+          "isDefault": {
+            "type": "boolean",
             "description": "This property is always true because it's a default field",
             "example": true,
             "default": true
           },

Also applies to: 17039-17043, 17065-17069, 17125-17130, 17168-17173, 17212-17216, 17255-17259


17304-17308: Restore boolean schema for custom isDefault flags

Same issue on the custom-field variants: the flag is supposed to be a boolean (always false here) but is published as an object, which breaks OpenAPI tooling.

-          "isDefault": {
-            "type": "object",
+          "isDefault": {
+            "type": "boolean",
             "description": "This property is always false because it's not default field but custom field",
             "example": false,
             "default": false
           }

Also applies to: 17349-17353, 17403-17407, 17452-17456, 17507-17511, 17556-17560, 17605-17609, 17652-17656, 17707-17711, 17766-17770, 17816-17820, 17865-17869


20435-20443: TeamOutputDto required list includes optional fields

bannerUrl, logoUrl, brandColor, darkBrandColor, and theme are nullable/optional in TeamOutputDto. Advertising them as required, non-nullable properties will cause client validation failures whenever the API returns null/omits them. Drop them from required or mark each property with "nullable": true to match runtime behavior.

-        "required": [
-          "id",
-          "slug",
-          "bannerUrl",
-          "name",
-          "logoUrl",
-          "weekStart",
-          "brandColor",
-          "darkBrandColor",
-          "theme"
-        ]
+        "required": [
+          "id",
+          "slug",
+          "name",
+          "weekStart"
+        ]

20573-20576: slotInterval must be numeric

slotInterval represents a minute count; publishing it as "type": "object" breaks schema consumers. Please revert to a numeric primitive (typically "type": "number" or "integer" with the same example).

-          "slotInterval": {
-            "type": "object",
+          "slotInterval": {
+            "type": "number",
             "example": 60,
             "nullable": true
           },

20610-20620: Fix primitive types for seats and redirect fields

Each of these still claims "type": "object", which is too loose and wrong for client generation. The API returns primitives:

  • seatsPerTimeSlot: numeric value (nullable).
  • forwardParamsSuccessRedirect: boolean toggle (nullable).
  • successRedirectUrl: string (nullable, ideally with format: "uri").
-          "seatsPerTimeSlot": {
-            "type": "object",
+          "seatsPerTimeSlot": {
+            "type": "number",
             "nullable": true
           },
-          "forwardParamsSuccessRedirect": {
-            "type": "object",
+          "forwardParamsSuccessRedirect": {
+            "type": "boolean",
             "nullable": true
           },
-          "successRedirectUrl": {
-            "type": "object",
+          "successRedirectUrl": {
+            "type": "string",
             "nullable": true
           },

20715-20721: Use concrete ID types for ownerId / parentEventTypeId

Both identifiers are emitted as numbers (nullable). Advertising them as object breaks OpenAPI contracts and generated types. Please restore their numeric schema (or string, if that is what the API actually returns) with nullable: true.

-          "ownerId": {
-            "type": "object",
+          "ownerId": {
+            "type": "number",
             "nullable": true
           },
-          "parentEventTypeId": {
-            "type": "object",
+          "parentEventTypeId": {
+            "type": "number",
             "description": "For managed event types, parent event type is the event type that this event type is based on",
             "nullable": true
           },
docs/api-reference/v2/openapi.json (30)

15921-15921: LGTM: integration example and enum

Example and enum look consistent.


15952-15952: LGTM

Enum terminator/bracket placement is correct.


16112-16112: LGTM: required list

Required fields align with properties in this schema.


19024-19034: Verify required list is accurate and non-breaking

Confirm all listed fields are guaranteed present in responses; otherwise, clients may fail validation.


19344-19350: LGTM: required keys

Newly required keys match schema intent assuming upstream DTOs guarantee presence.


19352-19375: LGTM: CreateTeamEventTypeOutput shape

Union on data covers single and array responses; required list is correct.


22503-22504: LGTM

Field type for name is correct.


22533-22534: LGTM

Boolean flag addition looks good.


16035-16046: Fix schema type: isDefault must be boolean

This breaks client generation if left as object.

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always true because it's a default field",
-            "example": true,
-            "default": true
-          },
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always true for default field",
+            "example": true,
+            "default": true
+          },

16066-16074: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always true because it's a default field",
-            "example": true,
-            "default": true
-          },
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always true for default field",
+            "example": true,
+            "default": true
+          },

16086-16093: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always true because it's a default field",
-            "example": true,
-            "default": true
-          },
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always true for default field",
+            "example": true,
+            "default": true
+          },

16140-16147: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always true because it's a default field",
-            "example": true,
-            "default": true
-          },
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always true for default field",
+            "example": true,
+            "default": true
+          },

16179-16186: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always true because it's a default field",
-            "example": true,
-            "default": true
-          },
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always true for default field",
+            "example": true,
+            "default": true
+          },

16218-16225: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always true because it's a default field",
-            "example": true,
-            "default": true
-          },
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always true for default field",
+            "example": true,
+            "default": true
+          },

16257-16264: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always true because it's a default field",
-            "example": true,
-            "default": true
-          },
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always true for default field",
+            "example": true,
+            "default": true
+          },

16302-16309: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always false because it's not default field but custom field",
-            "example": false,
-            "default": false
-          }
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always false for custom field",
+            "example": false,
+            "default": false
+          }

Also aligns with the required list referencing isDefault.


16339-16346: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always false because it's not default field but custom field",
-            "example": false,
-            "default": false
-          }
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always false for custom field",
+            "example": false,
+            "default": false
+          }

16383-16390: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always false because it's not default field but custom field",
-            "example": false,
-            "default": false
-          }
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always false for custom field",
+            "example": false,
+            "default": false
+          }

16424-16431: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always false because it's not default field but custom field",
-            "example": false,
-            "default": false
-          }
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always false for custom field",
+            "example": false,
+            "default": false
+          }

16469-16475: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always false because it's not default field but custom field",
-            "example": false,
-            "default": false
-          }
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always false for custom field",
+            "example": false,
+            "default": false
+          }

16509-16516: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always false because it's not default field but custom field",
-            "example": false,
-            "default": false
-          }
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always false for custom field",
+            "example": false,
+            "default": false
+          }

16550-16557: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always false because it's not default field but custom field",
-            "example": false,
-            "default": false
-          }
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always false for custom field",
+            "example": false,
+            "default": false
+          }

16589-16596: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always false because it's not default field but custom field",
-            "example": false,
-            "default": false
-          }
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always false for custom field",
+            "example": false,
+            "default": false
+          }

16633-16640: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always false because it's not default field but custom field",
-            "example": false,
-            "default": false
-          }
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always false for custom field",
+            "example": false,
+            "default": false
+          }

16681-16688: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always false because it's not default field but custom field",
-            "example": false,
-            "default": false
-          }
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always false for custom field",
+            "example": false,
+            "default": false
+          }

16722-16729: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always false because it's not default field but custom field",
-            "example": false,
-            "default": false
-          }
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always false for custom field",
+            "example": false,
+            "default": false
+          }

16763-16770: Fix schema type: isDefault must be boolean

-          "isDefault": {
-            "type": "object",
-            "description": "This property is always false because it's not default field but custom field",
-            "example": false,
-            "default": false
-          }
+          "isDefault": {
+            "type": "boolean",
+            "description": "Always false for custom field",
+            "example": false,
+            "default": false
+          }

19160-19163: Wrong type: slotInterval should be integer (nullable)

Current type object will break clients.

-          "slotInterval": {
-            "type": "object",
-            "example": 60,
-            "nullable": true
-          },
+          "slotInterval": {
+            "type": "integer",
+            "format": "int32",
+            "example": 60,
+            "nullable": true
+          },

19197-19207: Wrong types: several fields incorrectly set to object

Align types with expected semantics.

-          "seatsPerTimeSlot": {
-            "type": "object",
-            "nullable": true
-          },
+          "seatsPerTimeSlot": {
+            "type": "integer",
+            "format": "int32",
+            "nullable": true
+          },
-          "forwardParamsSuccessRedirect": {
-            "type": "object",
-            "nullable": true
-          },
+          "forwardParamsSuccessRedirect": {
+            "type": "boolean",
+            "nullable": true
+          },
-          "successRedirectUrl": {
-            "type": "object",
-            "nullable": true
-          },
+          "successRedirectUrl": {
+            "type": "string",
+            "format": "uri",
+            "nullable": true
+          },

19295-19313: Correct ownerId/parentEventTypeId/hosts types

IDs should be numeric; host IDs items numeric.

-          "ownerId": {
-            "type": "object",
-            "nullable": true
-          },
+          "ownerId": {
+            "type": "number",
+            "nullable": true
+          },
-          "parentEventTypeId": {
-            "type": "object",
-            "description": "For managed event types, parent event type is the event type that this event type is based on",
-            "nullable": true
-          },
+          "parentEventTypeId": {
+            "type": "number",
+            "description": "For managed event types, parent event type is the event type that this event type is based on",
+            "nullable": true
+          },
-          "hosts": {
-            "type": "array",
-            "items": {
-              "type": "string"
-            }
-          },
+          "hosts": {
+            "type": "array",
+            "items": {
+              "type": "number"
+            }
+          },

@supalarry supalarry merged commit b2ac227 into main Sep 25, 2025
82 of 85 checks passed
@supalarry supalarry deleted the lauris/cal-6464-add-missing-dtos branch September 25, 2025 09:10
@github-actions
Copy link
Contributor

E2E results are ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api area: API, enterprise API, access token, OAuth 🐛 bug Something isn't working core area: core, team members only platform Anything related to our platform plan ready-for-e2e size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants