Some "plugins" to add to the community #535
Brian-McBride
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
@colinhacks The mock is pretty cool, in that it can be pretty contextual faker.js behind it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
NPM Packages:
@anatine/zod-openapi
SchemaObject
@anatine/zod-mock
@anatine/zod-nestjs
@anatine/zod-openapi
to display schemas.Goals
I like where
tRPC
is going. I hope to bring in the same ideas around a cleaner client/server connection. I'm concerned about conflicting types (server-based data vs client data) or unexpected imports into the client's compiled code.I'd like to see a pattern with a shared lib of the base Zod objects. Then libs that wrap those into server structures (express, fastify, etc...) and client (axios, fetch, etc...) without any cross imports between the two.
My other use case is OpenAPI. There are just too many gateways or other supporting infrastructure that ask for an API Schema. These libs are following a code-first approach. In the case of NestJS - it is very easy to set up a script to generate the swagger doc, save it as a file or upload it to an API Gateway in the CI/CD process.
Credits
These are not unique libs. I went to use some of the other libs in the Zod community section and found some were outdated (broken) and others just didn't quite cover my use cases.
zod-dto
: Extensive use and inspiration for working with NestJSexpress-zod-api
: Offered great insight into parsing Zod.Beta Was this translation helpful? Give feedback.
All reactions