5.0.6 • Published 2 years ago

json-schema-faker-cli v5.0.6

Weekly downloads
77
License
MIT
Repository
github
Last release
2 years ago

json-schema-faker-cli

MIT License Build Status

NPM status

This is a CLI for json-schema-faker.

install

npm install -g json-schema-faker-cli

usage

params

  • (required) file (path) containing JSON schema
  • (optional) generated file (path) according to the provided schema
  • (optional) number of objects in the array (when you want to generate an array of multiple objects matching the schema)
  • (optional) file (path) containing options (in JS or JSON format)

generating single object from the schema

generate-json schema.json output.json

generating array of multiple objects

generate-json schema.json output.json $ITEMS_LENGTH

generating with options set

generate-json schema.json output.json none options.js

You can use any of the json-schema-faker available options.

an example options file:

module.exports = {
  minLength: 20,
  random: () => 0.2,
};

generating to stdout

generate-json schema.json

skipping a param

You can pass none to skip any of the optional params. It's useful when you need to pass a following param when skipping some of the previous params at the same time.

5.0.6

2 years ago

5.0.5

2 years ago

5.0.4

2 years ago

5.0.3

2 years ago

5.0.2

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

4.0.0

2 years ago

3.0.7

3 years ago

3.0.6

3 years ago

3.0.5

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.10

4 years ago

2.0.9

5 years ago

2.0.8

5 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago