Skip to content

Conversation

sruenwg
Copy link
Contributor

@sruenwg sruenwg commented Jun 8, 2025

This PR fixes convertSchema to no longer mark exactOptional object properties as required properties in the output JSON Schema.
See playground example{} is clearly a valid value according to the schema, but the generated JSON Schema would reject this as it requires the k2 property.

Copy link

vercel bot commented Jun 8, 2025

@sruenwg is attempting to deploy a commit to the Valibot Team on Vercel.

A member of the Team first needs to authorize it.

@fabian-hiller fabian-hiller self-assigned this Jun 9, 2025
@fabian-hiller fabian-hiller added the fix A smaller enhancement or bug fix label Jun 9, 2025
Copy link

pkg-pr-new bot commented Jun 9, 2025

Open in StackBlitz

npm i https://pkg.pr.new/valibot@1220

commit: 48e97e6

@fabian-hiller
Copy link
Owner

Thank you for your contribution! Not sure how we could miss that. I will merge it before releasing the next version of the package.

@fabian-hiller fabian-hiller added the priority This has priority label Jun 9, 2025
@sruenwg
Copy link
Contributor Author

sruenwg commented Jun 9, 2025

Thanks! 👍

@fabian-hiller fabian-hiller added this to the v1.4 (to-json-schema) milestone Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A smaller enhancement or bug fix priority This has priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants