1.0.6 • Published 1 year ago

mockupgen v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

MockupGen

Generate mockup data using json and export it to SQL or other formats.

CLI tool to generate mockup date based on a json schema.
NOTE: You don't need to specify the extension for the schema

Usage: mockupgen ./storesShema

Arguments:
-dir, --dir  : Specify the output directory for the generated data
-out, --out  : Specify the output adapter used to the generated data (by default the output format is JSON)

Output Adapters:
json : Default adapter
sql : Generates an sql file with all the tables

Installation

npm install -g mockupgen

Examplse :

Function NameParamsDescription
idnoneReturns the current row index
randlow,highReturns a random number between low and high
first_namenoneReturns a random first name
last_namenoneReturns a random last name
{
  "_constants": {
    "MIN": "1",
    "MAX": "2"
  },
  "CUSTOMER": {
    "_columnRowCount": 10,
    "CUSTOMER_ID": {
      "type": "ID"
    },
    "AGE": {
      "type": "RAND",
      "args": ["$MIN", "$MAX"]
    },
    "CUSTOMER_FIRST_NAME": {
      "type": "FIRST_NAME"
    }
  },
  "STORES": {
    "_columnRowCount": 2,
    "STORE_ID": {
      "type": "ID"
    }
  }
}
1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago