datagen-rs
A Rust library for generating random data from a JSON schema.
Installation
Add the following to your Cargo.toml:
[]
= "0.1.0"
Usage
Generate data from a schema file
use ;
Generate data from a schema string
use ;
Write the JSON schema to a file
use write_json_schema;
Features
| Feature | Description | Depends on |
|---|---|---|
plugin |
Enables loading plugins | |
native-plugin |
Enables loading plugins written in Rust | plugin |
serialize |
Enables serialization/deserialization for all structs using serde. |
|
map-schema |
Enables data generation for several types | serialize |
generate |
Enables data generation for all types | map-schema |
schema |
Enables JSON schema generation using schemars |
serialize |
all |
Enables all features | native-plugin, generate, schema |