Closed TomiS closed 3 months ago
Thanks. The validateJsonableSchema
just doesn't support recursive schemas. I planned to rewrite it for a long time because of this and another reason, but since there were no recursive users, I postponed it :)
Looks like I have a reason to do so now 😅
For now, you can use serializeToUnknownWith
, which doesn't have the validateJsonableSchema
check.
Thank you for reporting and the reproduction. I fixed the error nicely in the commit https://github.com/DZakh/rescript-schema/commit/b86ddea5681ce42a7040ea7bcaf6e4d579096d9a. I want to make a few more changes and release it as a part of the V8 release.
Very nice. Thanks for addressing this so quickly. I'm on vacation right now but will try out version 8 when it's released - or use the workaround meanwhile.
Letting you know, that I found a bug with infinit loop when recursive schema fails parsing. I'll release 7.0.2 with a fix asap.
7.0.2
is published. I recommend you updating
I released https://github.com/DZakh/rescript-schema/releases/tag/v8.0.0 with a fix 🚀
I'm happy to confirm the problem indeed seems to have been fixed with 8.0.0. Thanks a lot!
Hey, I ran into this rather interesting bug which originates to
validateJsonableSchema
function, I believe. I think it relates to wrapping a recursive (union?) schema inside a non-recursive schema. Or at least that's how I can cause the bug reliably.I made a somewhat minimal repro. It can be found in this repository. See readme.md