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.
This commit is contained in:
2025-03-19 08:40:37 +01:00
parent cd22418786
commit d61e518697
2 changed files with 34 additions and 14 deletions

View File

@@ -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;

View File

@@ -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 = {