Source generators
This repository contains a set of source generators for C#
Zod Poco Schema Generator
The reason I chose to generate Zod schemas instead of Typescript is because Zod is a runtime schema validator - meaning that it can be used to validate the data at runtime, unlike Typescript which is only used for type checking at compile time.
Zod also has a Typescript type function - z.infer<>
- which can be used to generate the Typescript types from the Zod schemas.
(required
keyword here is only to reduce boilerplate; Otherwise I'd have to assign default values)
Contributing
Contributions are welcome, feel free to open a pull request.
Authors
- Kenneth Hoff - Everything