generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 176
Labels
bugSomething isn't workingSomething isn't workingcompletedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedparserThis item relates to the Parser UtilityThis item relates to the Parser Utility
Description
Expected Behavior
Trying out the S3Schema parser with an empty records array passes validation. This should not occur.
Current Behavior
Output of success
is true, while false
was expected.
Code snippet
import { S3Schema } from '@aws-lambda-powertools/parser/schemas';
const event = { Records: [] };
const parsedEvent = await S3Schema.safeParseAsync(event);
console.log(parsedEvent.success); // <-- Output: true, expected: false
Steps to Reproduce
Run code snippet above
Possible Solution
No response
Powertools for AWS Lambda (TypeScript) version
"@aws-lambda-powertools/parser": "2.13.0"
AWS Lambda function runtime
22.x
Packaging format used
npm
Execution logs
Zod version: 3.24.1
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompletedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedparserThis item relates to the Parser UtilityThis item relates to the Parser Utility
Type
Projects
Status
Shipped