Skip to content

team-opensource-plus/dummy-generator

Repository files navigation

SCR-20230815-qmsp-2 copy

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.

About

auto generator database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •