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

Support uniqueItems in JSON schema? #866

Open
nix6839 opened this issue Oct 8, 2024 · 5 comments · May be fixed by #870
Open

Support uniqueItems in JSON schema? #866

nix6839 opened this issue Oct 8, 2024 · 5 comments · May be fixed by #870
Assignees
Labels
enhancement New feature or request priority This has priority

Comments

@nix6839
Copy link

nix6839 commented Oct 8, 2024

Can uniqueItems of JSON schema be supported through v.set, similar to Zod?

BTW, thanks for the awesome project.

@fabian-hiller
Copy link
Owner

Set is not supported by JSON schema so I would prefer to add a uniqueItems action to Valibot instead and also use this action to add uniqueItems when using toJsonSchema. What do you think?

@fabian-hiller fabian-hiller self-assigned this Oct 8, 2024
@fabian-hiller fabian-hiller added the enhancement New feature or request label Oct 8, 2024
@nix6839
Copy link
Author

nix6839 commented Oct 8, 2024

Set is not supported by JSON schema so I would prefer to add a uniqueItems action to Valibot instead and also use this action to add uniqueItems when using toJsonSchema. What do you think?

I think your idea sounds even better.

@fabian-hiller
Copy link
Owner

I am pretty busy right now, but I will try to implement it in the next few weeks.

@fabian-hiller fabian-hiller added the priority This has priority label Oct 8, 2024
@nix6839
Copy link
Author

nix6839 commented Oct 9, 2024

If it's okay with you, I'll try contributing.

@fabian-hiller
Copy link
Owner

Yes, feel free to create a PR. 🙌

@nix6839 nix6839 linked a pull request Oct 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority This has priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants