Skip to content

Data Autogeneration


Chimera allows you to automatically generate mock JSON data using a custom schema file. This is useful when you need realistic sample data for testing or demos without manually crafting each entry.

A schema file defines the structure of the data and how values should be generated. Here’s a simple example:

{
"routes": [
{
"path":"api/v2/data",
"no_of_entries": 2,
"schema": {
"id": "id",
"created_on": "date",
"mssg": "lorem"
},
"null_percentage": 0
}
]
}
PlaceholderDescription
nameRandom name
idRandom number
integerRandom number
dateDate in DD-MM-YYYY format
datetimeDate in DD-MM-YYYYTHH:MM:SS format
loremRandom text
stringRandom word
booleanRandom boolean value

More placeholder types will be added in future versions.

Use the --path flag with the -X option to autogenerate data:

Terminal window
chimera-cli.exe --path schema.json http -X

This will generate mentioned items for each endpoint defined in the schema and serve them as mock API routes.

  • path: Name of the route
  • no_of_entries: Number of mock entries to generate
  • schema: Define fields and their data type
  • null_percentage: Percentage of fields and rows to be randomly set as null

You can also combine it with other flags like --port, --latency, and --sort.

{
"routes": [
{
"path":"api/v2/data",
"no_of_entries": 2,
"schema": {
"id": "id",
"created_on": "date",
"mssg": "lorem"
},
"null_percentage": 0
},
{
"path":"products",
"no_of_entries": 3,
"schema": {
"id": "id",
"rsnd": "integer",
"name": "name",
"probability": "boolean",
"date": "datetime",
"desc": "lorem"
},
"null_percentage": 0
}
]
}

Output response for route /api/v2/data

[
{
"created_on": "05-07-2025",
"id": 1,
"mssg": "est nostrum nulla dolores ex voluptas.\nomnis quisquam neque est omnis at."
},
{
"created_on": "05-07-2025",
"id": 2,
"mssg": "laboriosam nostrum blanditiis voluptas rerum quaerat exercitationem molestiae autem."
}
]

Output response for route /products

[
{
"date": "2025-07-05T17:59:55.523450+00:00",
"desc": "et eveniet veniam et architecto rerum.",
"id": 1,
"name": "Keaton Gutmann",
"probability": true,
"rsnd": 74
},
{
"date": "2025-07-05T17:59:55.524469200+00:00",
"desc": "asperiores molestiae corrupti delectus repellendus consequuntur at.\nid aut autem fuga officia.",
"id": 2,
"name": "Shakira Hickle",
"probability": true,
"rsnd": 38
},
{
"date": "2025-07-05T17:59:55.524489100+00:00",
"desc": "quis sit sit consequuntur et animi similique.\niste dicta et aperiam unde ut et.",
"id": 3,
"name": "Virgie Nitzsche",
"probability": true,
"rsnd": 36
}
]