0.9.9 • Published 6 months ago

json-schema-to-zod-piped v0.9.9

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

json-schema-to-zod-piped

NPM Version Build Status

Use stdin / stdout logic with json-schema-to-zod for json

help: npx json-schema-to-zod-piped@latest --help

Options:
  -h,  --help               Show help
  -o,  --output <string>    output module (with import & export) or schema only (choices: "module", "schema") (default: "schema")
  -ml, --multiline          enable multiline: continues parsing, seperated with \n\n (default: false)
  -n,  --name <string>      the name of the export (default: "default")
  -m,  --module <string>    whether to use cjs or esm (choices: "cjs", "esm") (default: "esm")
  -i,  --input              If the schema should be in or output of json (default: false)                                          
  -d,  --deref              Use json-schema-ref-parser to dereference the schema (default: false)
  -rc, --resolve-circulars  Whether to resolve circular references while dereferencing (default: true)
  -d,  --defaults           use default values in the schema (default: true)
  -e,  --exit-on-error      exit on error instead of giving out z.any() (default: true)

install without running

npx -y --package json-schema-to-zod-piped@latest -c exit

some usages for bash:

single line

press enter + type EOF + enter again to end input

cat << EOF | npx json-schema-to-zod-piped@latest

multiline

2x enter to end input, write ;;exit as input to exit To switch to input / output mode, prefix json with ;;true;; or ;;false;;

cat | npx json-schema-to-zod-piped@latest --multiline

--input flag

inputno input
z.coerce.date()z.date()
0.9.8

6 months ago

0.9.7

6 months ago

0.9.9

6 months ago

0.9.4

8 months ago

0.9.3

8 months ago

0.9.6

8 months ago

0.9.5

8 months ago

0.9.2

9 months ago

0.9.1

9 months ago

0.9.0

9 months ago

0.8.5

9 months ago

0.8.4

9 months ago

0.8.3

9 months ago

0.8.2

9 months ago

0.8.1

9 months ago

0.8.0

9 months ago