15 Replies
When I remove the .use it works without any problems
it's only for the intelisense/types, the request works
hey @Joker! is
OpenAPIHono
a custom class?
it's hard to say what the issue is w/o knowing what's going on in thereit's from
@hono/zod-openapi
ahhhh
interesting
i haven't seen
zod-openapi
used that way
you're passing the app type to the hono client, yeah?yes
hm. this seems to work fine for me:
even if you add an intermediate api app
what's the actual typescript error you're getting?
it's helpful to include these, or any error logs, when posting questions like this
thanks
can you share the routing code for the main app?
or at least
/api
the error suggests that /secret
isn't being registeredsure
oh dang. i think i remember an issue about this
in any case, the solve is to explicitly pass the route param to
use
app.use('*', ...)
yeah i think i will do that and then make an if check
yeah worked
this example could help you lose a layer, but i wouldn't expect that to make a difference: https://github.com/honojs/middleware/issues/379#issuecomment-1929994758
GitHub
How to Insert Custom Middleware Using @hono/zod-openapi ? · Issue #...
I'm trying to use custom middleware with @hono/zod-openapi to enhance request handling by inserting custom logic and types. However, it seems like the current setup does not allow middleware to...
from what i've seen, all the hono examples show either the path arg set (for
use
) or apply the middleware without directly chaining
i could swear there was an issue, maybe with hono itself, related to *
middleware typing, but i've been unable to dig it upcould have been this one, but seems like the inverse problem: https://github.com/honojs/hono/issues/3122
GitHub
4.4.12 breaks client typing when using use with a path · Issue #312...
What version of Hono are you using? 4.4.12 What runtime/platform is your app running on? Node What steps can reproduce the bug? Stackblitz of the reproduction: https://stackblitz.com/edit/hono-clie...