Uh oh!
There was an error while loading. Please reload this page.
feat: adopt standard schema spec and support different validators - #3524
Merged
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying content with |
| Latest commit: | 3b45047 |
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1d51acee.content-f0q.pages.dev |
| Branch Preview URL: | https://feat-standard-schema.content-f0q.pages.dev |
commit: |
7 tasks
This is awesome. I just tested this via |
MuntasirSZN
commented
Sep 8, 2025
@farnabaz what would the validators @nuxt/content would support? Arktype, typebox, typia? |
farnabaz
commented
Sep 9, 2025
MemberAuthor
Module can support any validator which satisfy Standard Schema and can convert to JSON Schema. My concern is mostly about the removing the bound between Nuxt Content and one specific validator. With help of community we can integrate other validators if needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked issue
#3482: Credits for Zod v4 to JSON Schema implantation to @MuntasirSZN
resolves#3462
❓ Type of change
📚 Description
Nuxt Content does not depend purely on Zod v3, and users will be able to use Zod v4 or their favorite validators. For now, the module supports Zod 3, Zod 4, and Valibot as a starting point, with support for additional validators planned in the future.
These changes are seamless for current users, and you should not face any breaking changes with this update.
Zod v4
Valibot
Syntax
To support multiple validators and remove unused dependencies, it is recommended to use the new syntax for importing Zod and setting
editor({})options. These are only suggestions for now, but in future patch releases they will be marked as deprecated and later removed in the next major version.import { z } from '@nuxt/content'will be deprecated in favor of direct imports such as:z.string().editor({ input: 'media' })will be deprecated in favor of the new syntax:📝 Checklist