Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zod support #963

Merged
merged 10 commits into from
Dec 21, 2024
Merged

zod support #963

merged 10 commits into from
Dec 21, 2024

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented Dec 21, 2024

Builtin support for zod validation


  • New Zod Support: Added support for Zod schemas to automatically convert them into JSON schemas using zodToJsonSchema, making data validation and repair more flexible and user-friendly.
  • Enhanced Schema Functionality: Updated the defSchema function to support both JSONSchema objects directly and Zod schemas, simplifying schema definitions for users.
  • Script Tests: Added a new property tests in the script configuration to allow defining additional test files, enabling comprehensive testing of scripts with varied inputs.
  • Readme Update: Updated the README file in packages/vscode/README.md to reflect changes related to Zod support and clarify its use in schema definitions.

AI-generated content by pr-describe may be incorrect

@pelikhan pelikhan mentioned this pull request Dec 21, 2024
packages/core/src/zod.ts Outdated Show resolved Hide resolved
Copy link

LGTM 🚀

The changes look good! The refactoring to use _delay from es-toolkit instead of esDelay, the addition of Zod schema handling in promptdom.ts, and the creation of zod.ts with a utility function to convert Zod schemas to JSON are well-considered and make the code more modular and maintainable.

AI-generated content by pr-review may be incorrect

@pelikhan pelikhan merged commit 1c906df into main Dec 21, 2024
14 checks passed
@pelikhan pelikhan deleted the zodvalidate branch December 21, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant