Skip to content

fix: rename OOO controller file to match NestJS Swagger plugin convention#28342

Merged
volnei merged 3 commits intocalcom:mainfrom
romitg2:fix/rename-ooo-controller
Mar 10, 2026
Merged

fix: rename OOO controller file to match NestJS Swagger plugin convention#28342
volnei merged 3 commits intocalcom:mainfrom
romitg2:fix/rename-ooo-controller

Conversation

@romitg2
Copy link
Member

@romitg2 romitg2 commented Mar 9, 2026

Problem

The OOO (Out of Office) controller endpoints were missing response type schemas in the generated OpenAPI spec

Root Cause

The NestJS Swagger CLI plugin uses controllerFileNameSuffix (default: ['.controller.ts']) to identify controller files for AST transformation. The OOO controller was named organizations-users-ooo-controller.ts (using -controller.ts), which didn't match the expected .controller.ts suffix.

This caused the plugin to skip injecting openapi.ApiResponse decorators, resulting in empty response schemas:
responses: { 200: { description: } }

Solution

Renamed the controller file to follow the standard NestJS convention:

  - organizations-users-ooo-controller.ts → organizations-users-ooo.controller.ts

This allows the Swagger plugin to properly process the controller and inject response types automatically, eliminating the need for explicit @ApiOkResponse decorators.

@romitg2 romitg2 requested a review from a team as a code owner March 9, 2026 08:35
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Mar 9, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@romitg2 romitg2 added ready-for-e2e run-ci Approve CI to run for external contributors labels Mar 9, 2026
@pull-request-size pull-request-size bot added size/L and removed size/XS labels Mar 9, 2026
@romitg2 romitg2 added ready-for-e2e run-ci Approve CI to run for external contributors and removed ready-for-e2e run-ci Approve CI to run for external contributors labels Mar 9, 2026
Copy link
Contributor

@volnei volnei left a comment

Choose a reason for hiding this comment

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

LGTM

@volnei volnei merged commit d6741a1 into calcom:main Mar 10, 2026
105 of 110 checks passed
yuvrajangadsingh pushed a commit to yuvrajangadsingh/cal.com that referenced this pull request Mar 11, 2026
…tion (calcom#28342)

* fix: rename OOO controller file to match NestJS Swagger plugin convention for type generation

* fix: update organization module import

* feat: generate openapi docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Created by Linear-GitHub Sync ready-for-e2e run-ci Approve CI to run for external contributors size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants