Created zod-to-d2 #2689
CarlosGamez-Nova
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks for the
d2diagramming language.In my current work, we often need to define Zod schemas that adhere to a particular ERD. This ERD is created and maintained using D2.
It has been a bit of a maintenance overhead to keep the D2 ERD diagram up-to-date when making changes to the Zod schemas.
I built and published this small library and CLI tool to extend the Zod syntax to allow devs to declare ERD relationships and annotations directly on their Zod schemas.
Either by using the package's
zodToD2function or the CLI, the D2 ERD is automatically built from the augmented Zod schema files.I hope this is useful for users of the D2 language with similar needs.
You can check the
zod-to-d2repo here: https://github.com/EngineersTools/zod-to-d2Beta Was this translation helpful? Give feedback.
All reactions