Skip to content

Playground

Left: an OpenAPI spec (YAML or JSON). Right: the test from the landing page on the client eberly generates from it, and the generated client itself. The client is rebuilt when you click outside the spec editor or press ⌘/Ctrl+S.

Try renaming title to name in PostDto: the test turns red, the same way tsc fails in your project when the backend changes its contract. Upload spec takes your own .json, .yaml or .yml file. It is processed in your browser and never leaves it.

Loading the editor…

The playground needs a wider screen: open this page on a desktop to edit the spec and watch the test go red. This is the test it runs:

example.test.ts
import { expect, test } from 'vitest'
import { z } from 'zod'
import { World } from '../eberly/generated'
test('a user creates a post', async () => {
const world = new World()
const user = world.createUser()
await user.signUp() // register + log in
const body = { title: 'Hello', content: 'First post' }
const created = await user.posts.create({ body })
created.assert(201, { // typed status
title: 'Hello', // exact value
createdAt: z.iso.datetime(), // Zod, Valibot, ArkType…
authorId: expect.any(Number), // vitest / Jest matcher
})
})

The test is type-checked, not run: there is no backend here, and signUp is a stub (the real one registers and logs in, see Stores). To run real tests against a real backend, see Getting started.

Privacy-friendly analytics, no cookies.