I want to prevent errors when I forget to put /
in the Routing path.
#960
Labels
enhancement
New feature or request
/
in the Routing path.
#960
Which middleware is the feature for?
@hono/zod-openapi
What is the feature you are proposing?
When defining API Schema in
hono/zod-openapi
, if a client is created with a mix ofpath:/hoge
andpath: hoge
, it works, but a type error occurs: If a client is created with a mix ofpath:/hoge
andpath:hoge
, it works, but a but a type error occurs.We would like to address this on the library side, as it is difficult to find errors when they occur.
Error Example
Solution
I came up with two approaches
Allow no
/
head and give it on the library sideRun-time Error
I think it would be ideal if I could narrow it down with a typescript type, but I haven't come up with a good way to do it.
I would like your advice!
The text was updated successfully, but these errors were encountered: