Rowsmith test data
v0.5.0Fake test data (CSV, JSON, SQL) from a schema.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_test_data Generate test data
Generate fake test data (CSV, JSON or SQL INSERTs) from a table schema. Use it first, when you need rows for fixtures, seed data or tests (list_column_types gives each type's options). Or pass schema (JSON Schema, e.g. a Pydantic or Zod export, or an OpenAPI component) instead of columns; unmappable fields are named. For related tables with matching keys, pass tables (one call, SQL or JSON). Next: invalid_values for values your code should reject. Free and rate-limited: up to 500 rows and 50 columns per call. No real person's data is used as input and no record is derived from a real person; e…
| Parameter | Type | Description |
|---|---|---|
chaos | object | Deliberate misbehaviour for testing error handling |
columns | array | The table's columns, 1 to 50 |
format | string | Output format (default csv) |
output_path | string | Write the data to this file instead of returning it (use for more than about 50 rows). Must be inside the working directory, or inside ROWSMITH_OUT_DIR when set; no '..' segments |
overwrite | boolean | Replace output_path if it already exists (default false) |
rows | integer | Number of rows, 1 to 500 (default 100) |
schema | object | Instead of columns: a JSON Schema object, or {openapi: <document>, component: <name>} |
seed | integer | Seed; the same schema and seed give identical output for the same generator version (default 1) |
table | string | Table name, used in SQL output (default data) |
tables | array | Instead of columns, schema, rows, table: related tables in order, each {name, rows, columns or schema}. A column {name, type: 'ref', table, column} takes its values from an earlier table's primary key… |
list_column_types List column types
List the supported column types and the options each accepts. Use it before generate_test_data when you need a type's options.
invalid_values Invalid test values
Deliberately invalid TEST DATA values (malformed emails, declining or Luhn-invalid card numbers, malformed addresses, Unicode edge cases, invalid IBAN and SSN shapes), each with the reason it is invalid. Same seed, same output for the same catalogue version. Use it after generate_test_data, to test that your validation rejects bad input.
| Parameter | Type | Description |
|---|---|---|
chaos | object | Deliberate misbehaviour for testing error handling |
count | integer | Default 10 |
fields | string | Comma-separated fields to keep, e.g. value,reason |
kind | string | Default all |
seed | integer |