Example Hono-Zod-OpenAPI app with a Fiberplane API explorer.

For an example with regular-old Hono, see: https://www.val.town/v/fiberplane/fiberplaneHonoStarter

  1. Import @fiberplane/hono
import { createFiberplane } from "https://esm.sh/@fiberplane/hono@0.4.4";
  1. Expose your OpenAPI spec
app.doc("/doc", { openapi: "3.0.0", info: { title: "User Management API", version: "v1.0.0", }, });
  1. Mount the api explorer

This will mount it at the root /*, but you can mount it to another route, like /fp/* if you are using / for your main app. We recommend / if your Hono app is an API without a frontend.

app.use( "/*", createFiberplane({ openapi: { url: "/doc" }, }), );
  1. Visit your Val's root route to play with the API explorer!

How it Works

createFiberplane mounts Fiberpalne at the root route (/), which can be used to explore the api's routes and make requests. Think of it like an embedded, lightweight postman.