b122de518c
File path = route. JSON/JSON5, dynamic .ts handlers + faker, templating, stateful CRUD (pagination/sort/persist), __variants, sequence, chaos, rate-limit, auth, validation, per-route + global proxy/record, splat routes, X-Scenario overlays, SSE. Visual docs (Scalar) at /__docs from a live OpenAPI 3 spec. OpenAPI import script. Zero-build via tsx. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
20 lines
524 B
Plaintext
20 lines
524 B
Plaintext
{
|
|
// feature: json5 (comments, trailing commas) + __variants
|
|
// try: /__test/profile · ?plan=pro · header X-Admin: 1
|
|
__variants: [
|
|
{
|
|
when: { query: { plan: 'pro' } },
|
|
delay: 200,
|
|
body: { plan: 'pro', seats: 25, features: ['sso', 'audit'] },
|
|
},
|
|
{
|
|
when: { headers: { 'x-admin': '1' } },
|
|
body: { plan: 'enterprise', seats: 999, features: ['sso', 'audit', 'scim'] },
|
|
},
|
|
{
|
|
// fallback (no `when`)
|
|
body: { plan: 'free', seats: 1, features: [] },
|
|
},
|
|
],
|
|
}
|