@automatons/typescript-zod
v1.0.0
Published
[](https://github.com/openapi-automatons/typescript-zod/actions/workflows/ci-cd.yml) [.
Generated schemas
import { PetSchema, type Pet } from "./models";
// runtime-validate an unknown payload
const pet: Pet = PetSchema.parse(await response.json());
// or non-throwing
const result = PetSchema.safeParse(payload);
if (!result.success) {
// result.error
}How can I use @automatons/typescript-zod?
This library is designed to be used by openapi-automatons. Please read the readme of openapi-automatons for how to use it.
