0.3.0 • Published 1 year ago

@typespec-tools/emitter-zod v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@typespec-tools/emitter-zod

TypeSpec library for emitting Zod Schemas from the TypeSpec DSL.


!WARNING This library uses the current emitter-framework that is set to be updated, which could cause breaking changes.

Disclaimer: Please note that this library is not officially affiliated with TypeSpec or Azure. It is an independent project started by @codingmatty.

Features / Roadmap

  • Emit basic Zod schemas from a TypeSpec file
  • Add options to configure emitter
  • Add support for built-in decorators
  • Add decorators to cover more cases specific to Zod

Install

npm install @typespec-tools/emitter-zod

Emitter

Usage

  1. Via the command line
tsp compile . --emit=@typespec-tools/emitter-zod
  1. Via the config
emit:
  - "@typespec-tools/emitter-zod"

The config can be extended with options as follows:

emit:
  - "@typespec-tools/emitter-zod"
options:
  "@typespec-tools/emitter-zod":
    option: value

Emitter options

OptionTypeDefaultDescription
output-filestring"output.ts"Name of the output file
0.3.0

1 year ago

0.2.2

1 year ago

0.2.0

1 year ago

0.1.4

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago