Extract routes from hono definition
Hi everyone, i want to extract all the routes from hono definition for example :
How is it possible ?
I want to make a function that take a typesafe parameter that will be the route and when i call the function fn, there will be autocompletion and i can have these possible options :
I want to make a function that take a typesafe parameter that will be the route and when i call the function fn, there will be autocompletion and i can have these possible options :
/api/transactions
/api/transactions/all
/api/transactions/:id
etc ...
I'm fighting with ExtractSchema
utility type but I don't achive my goal
Thanks.5 Replies
have you tried the Hono RPC client?
sounds like that's what you want
no I already use the RPC client for my frontend
but what I want now is a specific use case in my backend
but I found the solution :
ah gotcha
out of curiosity, what are you using this for?
for caching and manually invalidate cache http responses
sick