diff --git a/packages/spec/src/data/object.zod.ts b/packages/spec/src/data/object.zod.ts index f24c973d0..22a991f60 100644 --- a/packages/spec/src/data/object.zod.ts +++ b/packages/spec/src/data/object.zod.ts @@ -97,14 +97,14 @@ const ObjectSchemaBase = z.object({ * Taxonomy & Organization */ tags: z.array(z.string()).optional().describe('Categorization tags (e.g. "sales", "system", "reference")'), - active: z.boolean().default(true).describe('Is the object active and usable'), - isSystem: z.boolean().default(false).describe('Is system object (protected from deletion)'), - abstract: z.boolean().default(false).describe('Is abstract base object (cannot be instantiated)'), + active: z.boolean().optional().default(true).describe('Is the object active and usable'), + isSystem: z.boolean().optional().default(false).describe('Is system object (protected from deletion)'), + abstract: z.boolean().optional().default(false).describe('Is abstract base object (cannot be instantiated)'), /** * Storage & Virtualization */ - datasource: z.string().default('default').describe('Target Datasource ID. "default" is the primary DB.'), + datasource: z.string().optional().default('default').describe('Target Datasource ID. "default" is the primary DB.'), tableName: z.string().optional().describe('Physical table/collection name in the target datasource'), /** diff --git a/packages/spec/src/stack.zod.ts b/packages/spec/src/stack.zod.ts index 13689668c..1ae52ef35 100644 --- a/packages/spec/src/stack.zod.ts +++ b/packages/spec/src/stack.zod.ts @@ -105,8 +105,9 @@ export type ObjectStack = ObjectStackDefinition; /** * Type-safe helper to define a project configuration. + * Uses input type to allow optional fields with defaults. */ -export const defineStack = (config: ObjectStackDefinition) => config; +export const defineStack = (config: z.input) => config; /** diff --git a/packages/spec/src/ui/app.zod.ts b/packages/spec/src/ui/app.zod.ts index bd5e9d24c..72894e7c5 100644 --- a/packages/spec/src/ui/app.zod.ts +++ b/packages/spec/src/ui/app.zod.ts @@ -150,10 +150,10 @@ export const AppSchema = z.object({ branding: AppBrandingSchema.optional().describe('App-specific branding'), /** Application status */ - active: z.boolean().default(true).describe('Whether the app is enabled'), + active: z.boolean().optional().default(true).describe('Whether the app is enabled'), /** Is this the default app for new users? */ - isDefault: z.boolean().default(false).describe('Is default app'), + isDefault: z.boolean().optional().default(false).describe('Is default app'), /** * Navigation Tree Structure.