Skip to content

Conversation

chungyau97
Copy link
Contributor

@chungyau97 chungyau97 commented Sep 30, 2025

Description

This PR adds support for using .default() on nested objects and arrays in SecureZodSchemaParser.
It enables parsing and handling of Zod schemas with default values for complex/nested structures, improving compatibility with advanced Zod patterns.

Test Result

Simple Complex
image image

@chungyau97 chungyau97 self-assigned this Sep 30, 2025
@chungyau97 chungyau97 added the enhancement New feature or request label Sep 30, 2025
@HenryHengZJ HenryHengZJ requested a review from Copilot September 30, 2025 09:15
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for .default() modifiers on nested objects and arrays in the SecureZodSchemaParser, expanding compatibility with advanced Zod patterns.

  • Adds 'default' to the ALLOWED_TYPES list for modifier support
  • Implements methods to extract and parse modifiers from object and array type strings
  • Updates type building logic to apply modifiers including default values to nested structures

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@HenryHengZJ HenryHengZJ merged commit 6890ced into main Sep 30, 2025
2 checks passed
erhhung pushed a commit to erhhung/flowise that referenced this pull request Oct 5, 2025
…chemaParser (FlowiseAI#5269)

feat(secureZodParser): add support for .default() on nested objects and arrays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants