fix(api): add @ApiExtraModels for location types in OpenAPI spec (#26951)

The UpdateInputAddressLocation_2024_08_13 and related location types were
referenced via getSchemaPath() but not registered with @ApiExtraModels,
causing them to be missing from the generated OpenAPI spec.

This fix adds @ApiExtraModels decorator to the BookingLocationController
to register all location types used in the UpdateBookingLocationInput.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Rajiv SahalandDevin AI authored and GitHub committed 2026-01-17 00:22:19 +02:00
1 parent 9d2fa89a5e
commit 1f28504db1
3 files changed
+354 -210

No files matched your search

@@ -1,4 +1,4 @@
import { ApiPropertyOptional, getSchemaPath } from "@nestjs/swagger";
import { ApiExtraModels, ApiPropertyOptional, getSchemaPath } from "@nestjs/swagger";
import { ApiProperty as DocsProperty } from "@nestjs/swagger";
import { plainToInstance } from "class-transformer";
import { IsOptional } from "class-validator";
@@ -109,6 +109,14 @@ export function ValidateUpdateBookingLocation_2024_08_13(validationOptions?: Val
};
}
@ApiExtraModels(
UpdateInputAddressLocation_2024_08_13,
UpdateBookingInputAttendeeAddressLocation_2024_08_13,
UpdateBookingInputAttendeeDefinedLocation_2024_08_13,
UpdateBookingInputAttendeePhoneLocation_2024_08_13,
UpdateBookingInputLinkLocation_2024_08_13,
UpdateBookingInputPhoneLocation_2024_08_13
)
export class UpdateBookingLocationInput_2024_08_13 {
@IsOptional()
@ValidateUpdateBookingLocation_2024_08_13()