mswjs / source

Generate MSW request handlers from various sources (HAR files, OpenAPI documents, etc).
https://source.mswjs.io
134 stars 5 forks source link

Support Zod schema #26

Closed kettanaito closed 3 months ago

kettanaito commented 1 year ago

Description

See https://twitter.com/rossipedia/status/1614327061191217152?s=46&t=u70oyeJtL5ZGB8Lze6BJ6Q

The intention is to generate handlers out of a Zod schema.

Alternatives

kettanaito commented 1 year ago

Maybe more sensible to do this support in the Data:

kettanaito commented 3 months ago

Zod schemas do not directly describe HTTP transactions but instead model data. This belongs in @mswjs/data.