Declarative Data Generation
Describe the shape of valid data — structure, constraints, distributions, and relationships — and Vague generates it.
- Weighted distributions:
0.8: "active" | 0.2: "inactive" - Constraints:
assume due_date >= issued_date - Cross-references:
any of customers where .status == "active" - Computed fields:
total: sum(line_items.amount)
schema Customer {
id: uuid(),
name: fullName(),
status: 0.8: "active" | 0.2: "inactive"
}
schema Invoice {
customer: any of customers where .status == "active",
amount: decimal in 100..10000,
issued_date: date in 2024..2024,
due_date: date in 2024..2024,
assume due_date >= issued_date
}
dataset TestData {
customers: 50 of Customer,
invoices: 200 of Invoice
}
Why Vague?
Generate realistic test data that respects your constraints and relationships.
Declarative Schemas
Define the shape of your data once. Schemas describe structure, types, ranges, and constraints — Vague handles generation.
Realistic Distributions
Express intent with weighted choices: 0.8: "active" | 0.2: "inactive". Statistical distributions like gaussian, poisson, and beta for realistic patterns.
Constraints That Work
Hard constraints like assume due_date >= issued_date are enforced. Conditional constraints for complex business logic.
Cross-Record References
Reference other records naturally: customer: any of customers where .status == "active". Build realistic relational data.
OpenAPI Integration
Import schemas from OpenAPI specs. Validate generated data. Populate specs with realistic examples.
Edge Case Testing
Built-in generators for Unicode exploits, SQL injection patterns, and boundary values. Generate constraint-violating data with violating datasets.