Zod Openapi references
See e.g: https://github.com/samchungy/zod-openapi?tab=readme-ov-file#auto-registering-schema
If I do:
```
import { z } from "@hono/zod-openapi";...
CORS Issue
Im using hono x bun for my backend and next js for my front end.
when i fetch the api it will return
"has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
i already set my cors settings, here i attached...

Openapi query params
I'm experimenting with openapi docs. I have:
```
const paramsSchema = z.object({
entry_id: z.string().openapi({
param: {...
Using both `c.body` and `c.json` in an endpoint results in `response.json()` of `Promise<unknown>`
hi everyone, is there any way to get the response type working when i have endpoints that return multiple type of content based on status code?
this is an example where it fails to infer the type
```ts
export const routes = new Hono()...
Deno .env...?
Hello, I wonder if anyone could help me. I 'm having some trouble getting values from my .env file in my Deno project. Works fine with a Bun version but is there some special trick with Deno? I've granted permissions in the terminal and I'm using the Hono adapter env helper. (I'm new to Deno). Thank you for any advice you may have. #deno
Adding swagger to hono API
I want to add a swagger doc to my API and when I add middleware to any new OpenAPIHono instance the .openapi method disappears.
```ts
/**
* Creates a base instance of Hono with middleware....
Hono RPC
Hello 👋 techies! It's Alfred. I'm currently working on building a backend service with Bun and Hono. I'm facing some challenges with the Hono RPC. Can anyone help me out?
RPC type error - Unable to interop
Repro repo: https://codeberg.org/Dreamboat9222/ioMonorepo-Edgedb-Hono-Svelte
In a monorepo, I have hono api in one package, and the ui (Svelte) in another and use EdgeDB as the database. It was working a couple of days ago, but I lost all intellisense abilities for 4 days so I was basically coding inside notepad 😂 (The issue is now fixed), but since then this stopped working. I also posted on the edgedb server, but I didn't receive any reply yet.
Posting here in case someone have an idea on what is going wrong....
How to pass and validate cookies (server<>server) ? (RPC)
I use Sveltekit and hono as an external API.
Most requests coming from the UI are done through XHR, but some requests (like token validation) is done from sveltekit server-side to hono api.
- When the user logs in, a cookie is set on the client (secure, lax).
- When the user close and re-open the site, the token is validated with a server hook. Sveltekit sees the cookies and make a request to hono, but hono doesn't see the cookies (obviously)....
SolidJS renderToString with Hono: Undefined or 'React not defined' error
Hi everyone,
I'm trying to use SolidJS's
renderToString
function within a Hono server to generate SVG components, but I'm running into issues. The renderToString
call always returns undefined, or I get a "React is not defined" error (if I change tsconfig.json
to "jsxImportSource": "solid-js"
). Has anyone successfully integrated SolidJS's JSX rendering with Hono or has ideas how to do so? If so, could you share how you resolved the JSX compilation for SolidJS?
Thanks 🙂
...Integration testing with test client and HTTP only cookies
Hello,
I have an API with HTTP only cookies built with Hono (Behind Next.js https://hono.dev/docs/getting-started/vercel). I tried to do some integration testing with Hono test client and vitest. I ran into a big issue that is my HTTP only cookies aren't send back to the server. It's normal since HTTP only behavior is handle by the browser and not Node or bun. So I was wondering what tooling or how could i do this integration testing. I want to run it in my CI CD.
Any idea or recommendation is welcome ^^...
Accessing .dev.vars outside of context
I use CF Workers and Hono to create an API and to read the secret variables in the .dev.vars you have to go through the context (c) but I want to define my client for several globally because i need to use it in multiple routes, did you know how i can do it?
.dev.vars:
```
APPWRITE_ENDPOINT=...
How to extend Hono's JWTPayload
I want to extend the default JWTPayload interface.
```
import type { JWTPayload } from 'hono/utils/jwt/types'
...
streamText only returning one chunk
```typescript
chatApi.get("/test", async (c) => {
const openai = new OpenAI({
apiKey: c.env.OPEN_AI_API_KEY,
})...
How to handle Websocket using "hono/vercel" running on NodeJS environment.
I am using NextJS 14 App Router with Hono to handle the API routes. I followed the documentation using 'hono/vercel', but it seems that it doesn't support WebSocket. Then, I switched to 'hono/node-server/vercel', but I encountered some problems with the response (I cannot use it). Please help me. 😩

Returning multiple files as a stream
i want to return multiple files by archiving them but for some reason the resulted archive is corrupted
``` ts
...
Client Response
I have a problem where what my API returns is not what the TS types say it is:
For example what I actually receive when logging
res
is simply an object that looks like this {email, message}. But there is no ok, json() that my IDE says there should be.
This is the route:...
How do I get rest params?
Take the following app:
```ts
import { Hono } from "hono";
import { trimTrailingSlash } from "hono/trailing-slash";...