diff --git a/src/server/api/schema/shares.ts b/src/server/api/schema/shares.ts index a8401eef6..bbc2626bb 100644 --- a/src/server/api/schema/shares.ts +++ b/src/server/api/schema/shares.ts @@ -126,9 +126,11 @@ export const CreateShareSchema = ShareSchema.omit({ createdAt: true, updatedAt: true, companyId: true, -}).openapi({ - description: "Issue shares to a stakeholder in a company.", -}); +}) + .strict() + .openapi({ + description: "Issue shares to a stakeholder in a company.", + }); export const UpdateShareSchema = ShareSchema.omit({ id: true, @@ -136,6 +138,7 @@ export const UpdateShareSchema = ShareSchema.omit({ updatedAt: true, }) .partial() + .strict() .refine( (data) => { return Object.values(data).some((value) => value !== undefined); diff --git a/src/server/api/schema/stakeholder.ts b/src/server/api/schema/stakeholder.ts index 854ff7470..b520158b7 100644 --- a/src/server/api/schema/stakeholder.ts +++ b/src/server/api/schema/stakeholder.ts @@ -86,7 +86,11 @@ export const CreateStakeholderSchema = z.array( id: true, createdAt: true, updatedAt: true, - }), + }) + .strict() + .openapi({ + description: "Add one or more stakeholder accounts to a company.", + }), ); export const UpdateStakeholderSchema = StakeholderSchema.omit({ id: true, @@ -94,6 +98,7 @@ export const UpdateStakeholderSchema = StakeholderSchema.omit({ updatedAt: true, }) .partial() + .strict() .refine( (data) => { return Object.values(data).some((value) => value !== undefined);