Labsco
Labsco/Repos/cloudflare/chanfana
REPO PACKAGE

cloudflare chanfana

OFFICIAL
cloudflare · publisher753 repository starsMIT · Freegithub.com/cloudflare/chanfana
1skill
1ready to use

The one skill, write-endpoints, walks through defining class-based OpenAPI endpoints with chanfana: schema definition with Zod v4, typed validation of query, path, header, and body parameters, CRUD operations, D1 database integration, and exception handling. It also documents chanfana's own CLI (npx chanfana), which boots your Worker with wrangler dev, fetches the generated schema from /openapi.json, and writes it to a static schema.json — useful for checking a schema into CI rather than regenerating it at request time.

This is for a team building an API on Cloudflare Workers with Hono or itty-router who wants a generated, validated OpenAPI spec instead of hand-writing one, or extending an existing router without touching its old routes. Cloudflare says chanfana is stable and production-ready, and points to its own Radar 2.0 public API as a user, not just a published-and-abandoned side project. It is not useful outside that stack: nothing here applies if your API isn't built on Hono or itty-router.

READ THE FULL ANALYSIS

A narrower package than the star count suggests. chanfana ships one skill covering one library; there is no separate skill for migrating off the project's previous name, itty-router-openapi, or for debugging a schema that chanfana rejects, so a reader gets the how-to-build guide and nothing past it.

1Work with nothing else to set up.
753Stars on the GitHub repository, at last check.