Find your adapter
Start with the schema and behavior you already use. Mimlet keeps the core small; generation and native library integrations are opt-in.
| Your input or job | Package | What to expect |
|---|---|---|
| A factory or Standard Schema validator | @mimlet/core | Immutable builders, input/output typing, async capabilities, sessions and scenarios; provide the factory. |
Modern typebox | @mimlet/typebox | Native creation, checking and codecs; explicit factory escape hatch. |
@sinclair/typebox | @mimlet/typebox-legacy | Native legacy TypeBox and Transform semantics. |
| JSON Schema or Standard JSON Schema conversion | @mimlet/json-schema | Supported draft validation, profiles and bounded generation; inspect unsupported capabilities. |
| Zod 4 / Zod Mini | @mimlet/zod | Native parsing/codecs, explicit async validation, input generation and factories. |
| ArkType | @mimlet/arktype | Native morphs/scopes, input checks, input generation and factories. |
| Valibot | @mimlet/valibot | Input conversion plus native parsing; factories for unsupported refinements. |
| class-validator DTOs (NestJS) | @mimlet/class-validator | Payloads for e2e tests and the DTO instances ValidationPipe produces; factories provide the values. |
| Effect 4 (Effect 3 through alpha.3) | @mimlet/effect | Native schemas, codecs, arbitraries and shrinking. |
| Realistic values | @mimlet/faker | Explicit session-scoped randomness, locale and reference date. |
| Property tests | @mimlet/fast-check | Native shrinking, scenario recomputation and checked replay. |
| OpenAPI / AsyncAPI | @mimlet/api | Operation/message fixtures and explicit serialization with offline references. |
| GraphQL | @mimlet/graphql | Native input fixtures and selection-aware response fixtures. |
| Protobuf | @mimlet/protobuf | Native values, offline imports and binary codecs. |
| Avro | @mimlet/avro | Native values, unions, 64-bit integers and binary codecs. |
| Generated fluent builders | @mimlet/codegen | Deterministic classes, CLI checks, optional self-contained runtime. |
| A local schema editor | @mimlet/playground | Loopback-only playground with bounded, interruptible workers. |
| Your own adapter | @mimlet/adapter | Capability inspection and reusable conformance checks. |
| UI previews, HTTP mocks, test persistence | @mimlet/consumers | Explicit loaders, response resolvers and caller-owned persistence. |
| Hey API generation | hey-api-builders | The established plugin, now backed by the neutral core. |
The dedicated Zod and ArkType adapters are included in 0.1.0-alpha.1. Follow the tested recipes, or retain the core and Standard JSON Schema path when those interfaces already meet your needs. The class-validator adapter was first published as 0.1.0-beta.4; see the NestJS DTO guide.
Validation, conversion and generation are different
Standard Schema describes validation and input/output types. It does not itself provide a generator or make arbitrary callbacks reversible. Conversion to JSON Schema can lose constraints that only the native validator understands.
Use buildValidated() or its async counterpart when decoded, validated output is required. Supply a factory when generation cannot faithfully express a constraint. Inspect the package's capabilities before claiming codec, generation or shrinking support. Pin the tested native-library versions in the compatibility matrix.
Realistic values for tests
Adapters that generate through JSON Schema (@mimlet/json-schema, @mimlet/zod, @mimlet/valibot, @mimlet/arktype, @mimlet/api and the JSON targets of @mimlet/codegen) default to the minimal profile: optional fields are left out and an unconstrained number can be anywhere in its range. profile: 'realistic' fills optional and nullable fields, keeps arrays at one to three items, draws unconstrained numbers from 1 to 100 within the schema's bounds and writes plain strings as readable words:
import { z } from 'zod';
import { fromZod } from '@mimlet/zod';
const Order = z.object({
reference: z.string(),
total: z.number().nonnegative(),
coupon: z.string().nullable().optional(),
lines: z.array(
z.object({
sku: z.string().max(12),
quantity: z.number().int().positive(),
note: z.string().optional(),
})
),
});
// The default profile leaves optional fields out and samples the whole safe-integer range.
export const minimal = fromZod(Order).build();
// realistic fills optional and nullable fields with readable words and small numbers.
export const realistic = fromZod(Order, { profile: 'realistic' }).build();The profile is part of the replay identity, and every value still passes the schema. See realistic values for the exact rules. Fix the values a test depends on with .with().
Keep the meaningful relationships
Faker supplies realistic primitives. Mimlet builders fix the fields that matter; scenarios connect related records. For property tests, shrink independent inputs and recompute the dependent values. See the agent recipes for executable examples of these combinations.