0.3.4 • Published 12 months ago

ajv-cmd v0.3.4

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

ajv-cmd

Deref, Validate, Transpile, and Test JSON-Schema (.json) files using ajv.

Setup

$ npm install -D ajv-cmd
$ ajv --help

Based off of ajv-cli.

Examples

Pre-transpile all handler schemas

#!/usr/bin/env bash

function bundle {
  ajv validate ${1} --valid \
	--strict true --coerce-types array --all-errors true --use-defaults empty
  ajv transpile ${1} \
	--strict true --coerce-types array --all-errors true --use-defaults empty \
	-o ${1%.json}.js
}

for file in handlers/*/schema.*.json; do
  if [ ! -n "$(bundle $file | grep ' is valid')" ]; then
	echo "$file failed"
	exit 1
  fi
done
0.3.4

12 months ago

0.1.13

1 year ago

0.1.14

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.2.2

1 year ago

0.3.3

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.0

2 years ago