fix(api-docs): correct integer field types in event-type schema#28042
Open
vivektarun wants to merge 1 commit intocalcom:mainfrom
Open
fix(api-docs): correct integer field types in event-type schema#28042vivektarun wants to merge 1 commit intocalcom:mainfrom
vivektarun wants to merge 1 commit intocalcom:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes incorrect data types in the API V2 documentation schema that caused the interactive "Try it" console for POST /v2/event-types to send integer fields as strings, resulting in validation errors from the API.
Motivation & Context
The OpenAPI schema defined numeric fields as
string, which caused Swagger UI to serialize numeric inputs like:"lengthInMinutes": 60 - But the data type is number
The API correctly validates these as integers and rejected requests with:
lengthInMinutes must be an integer number
This PR updates the schema definitions so these fields are correctly typed as integers, ensuring the documentation console sends valid JSON numbers.
Changes
lengthInMinutes→ integerlengthInMinutesOptions[]→ integerVisual Demo
Image Demo
Before Fix:

Try-it console sends:
"lengthInMinutes": "60"
API Response:
Validation error → must be integer
After Fix:

Try-it console sends:
"lengthInMinutes": 60
API Response:
Success response ✔
Mandatory Tasks
How should this be tested?
POST /v2/event-types
title = Test Event
slug = test-event
length = 60
Expected Result
Payload should now send:
lengthInMinutes: 60 as
integerinstead of
"lengthInMinutes": 60
numberThe API should return a success response instead of a validation error.
Environment Variables
No additional environment variables required beyond standard local setup.
Minimal Test Data
Only required fields:
Checklist