1.0.3 • Published 9 months ago

dummy-generator v1.0.3

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

GitHub license Node version npm version PRs Welcome

dummy-generator

Dummy-genenrator is a library that generates dummy data based on the schema you want. Especially, it is useful when you do some test. You might have tired of making dummy data for your test code. This library will help you to make dummy data easily.

required

  • node version >= 16.20.1

Installation

  1. Register and Login in to OpenAPI
  2. Get API from OpenAPI
  3. Generate API token
    • which is like this sk-xxxxxxxxxxxxxxxxxxxxxxxx
  4. Install dummy-generator
    $ npm install dummy-generator
  5. Init dummy-generator
    $ dummy init sk-xxxxxxxxxxxxxxxxxxxxxxxx

Documentation

# init dummy-generator with api-token
$ dummy init <api-token>

# generate dummy data
$ dummy g -f <config-file> -o <output-type> -c <count>
  • default.json will be generated in the root folder

Config Examples

{
	"output_type": "json",
	"require_count": 10,
	"language": "en",
	"columns": [
		{
			"column-name": "name",
			"column-description": "unique name",
			"max-length": "3",
			"unique": true
		},
		{
			"column-name": "age",
			"column-description": "between 20 and 30",
			"max-length": "2",
			"unique": false
		}
	]
}

Contributing

welcome to contribute to this project. This project is open to anyone who wants to contribute to this project. Using the issue tracker and pull request, you can contribute to this project.

License

React is MIT licensed.