From d61e518697e5a44fb054eae94c76c7b7f57e8c3e Mon Sep 17 00:00:00 2001 From: Felipe Cardoso Date: Wed, 19 Mar 2025 08:40:37 +0100 Subject: [PATCH] Add event_id and guest_id to RSVPSchema and RSVPSchemaCreate event_id and guest_id fields were added to both RSVPSchema and RSVPSchemaCreate to ensure these properties are included in the API schema. This change also updates the required fields list, improving completeness and validation for RSVP-related actions. --- frontend/src/client/schemas.gen.ts | 42 +++++++++++++++++++++--------- frontend/src/client/types.gen.ts | 6 +++-- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/frontend/src/client/schemas.gen.ts b/frontend/src/client/schemas.gen.ts index e0d8b52..d1284b1 100644 --- a/frontend/src/client/schemas.gen.ts +++ b/frontend/src/client/schemas.gen.ts @@ -2715,6 +2715,16 @@ export const PresignedUrlResponseSchema = { export const RSVPSchemaSchema = { properties: { + event_id: { + type: "string", + format: "uuid", + title: "Event Id", + }, + guest_id: { + type: "string", + format: "uuid", + title: "Guest Id", + }, status: { $ref: "#/components/schemas/RSVPStatus", }, @@ -2771,12 +2781,30 @@ export const RSVPSchemaSchema = { }, }, type: "object", - required: ["status", "id", "response_date", "created_at", "updated_at"], + required: [ + "event_id", + "guest_id", + "status", + "id", + "response_date", + "created_at", + "updated_at", + ], title: "RSVPSchema", } as const; export const RSVPSchemaCreateSchema = { properties: { + event_id: { + type: "string", + format: "uuid", + title: "Event Id", + }, + guest_id: { + type: "string", + format: "uuid", + title: "Guest Id", + }, status: { $ref: "#/components/schemas/RSVPStatus", }, @@ -2811,19 +2839,9 @@ export const RSVPSchemaCreateSchema = { additional_info: { title: "Additional Info", }, - event_id: { - type: "string", - format: "uuid", - title: "Event Id", - }, - guest_id: { - type: "string", - format: "uuid", - title: "Guest Id", - }, }, type: "object", - required: ["status", "event_id", "guest_id"], + required: ["event_id", "guest_id", "status"], title: "RSVPSchemaCreate", } as const; diff --git a/frontend/src/client/types.gen.ts b/frontend/src/client/types.gen.ts index e6cdaf3..06f54ef 100644 --- a/frontend/src/client/types.gen.ts +++ b/frontend/src/client/types.gen.ts @@ -467,6 +467,8 @@ export type PresignedUrlResponse = { }; export type RsvpSchema = { + event_id: string; + guest_id: string; status: RsvpStatus; number_of_guests?: number; response_message?: string | null; @@ -479,13 +481,13 @@ export type RsvpSchema = { }; export type RsvpSchemaCreate = { + event_id: string; + guest_id: string; status: RsvpStatus; number_of_guests?: number; response_message?: string | null; dietary_requirements?: string | null; additional_info?: unknown; - event_id: string; - guest_id: string; }; export type RsvpSchemaUpdate = {