0.5.0 • Published 2 years ago

zod-avsc v0.5.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Zod to Avro.

Untested. Beta.

Pretty self explanatory.

npm install zod-avsc

Usage:

import { z } from "zod";
import { zodToAvro } from "zod-avsc";

const description = "Some values";
const zodValue = z.object(
  {
    name: z.string(),
    age: z.number(),
    address: z.object({
      street: z.string(),
      city: z.string(),
      state: z.string(),
      zip: z.string(),
    }),
  },
  { description }
);
const avroSchema = zodToAvro("Person", zodValue, { namespace: "com.acme.people" });
0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago