Skip to content

Commit 4d8bfe1

Browse files
committed
fix: resolve Zod JSON Schema generation failures
- Revert configBundles/abTests/httpGateways from .optional() back to .default([]) — Zod v4 cannot represent undefined in JSON Schema - Replace z.undefined() with z.never() in AB test variant XOR union - Strip empty evo arrays in writeProjectSpec so they don't appear in agentcore.json for users who haven't opted into preview features
1 parent 839b32b commit 4d8bfe1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/schema/schemas/primitives/ab-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ export type TargetRef = z.infer<typeof TargetRefSchema>;
4545

4646
const ConfigBundleVariantConfigSchema = z.object({
4747
configurationBundle: ConfigurationBundleRefSchema,
48-
target: z.undefined().optional(),
48+
target: z.never().optional(),
4949
});
5050

5151
const TargetVariantConfigSchema = z.object({
52-
configurationBundle: z.undefined().optional(),
52+
configurationBundle: z.never().optional(),
5353
target: TargetRefSchema,
5454
});
5555

0 commit comments

Comments
 (0)