You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What runtime/platform is your app running on? (with version if possible)
Bun workspace
What steps can reproduce the bug?
I am writing one api with hono, and openapi doc with hono-openapi.
The api like:
import{describeRoute}from'hono-openapi';exportconstvalidateOpenapiRoute=describeRoute({tags: ['api-tools'],description: 'Validate the openapi schema',responses: {200: {description: 'Successful validate the openapi schema',content: {'application/json': {schema: resolver(successEmptyResponseSchema),},},},},});apiTool.post('/validate-openapi-schema',validateOpenapiRoute,validateOpenapiValidator,async(c)=>{const{ openapiSchema }=c.req.valid('json');
...
});
When I use hono v4.6.16 and hono-openapi v0.4.4, everything works well.
But after I upgrade the hono to v4.6.17 ~ v4.6.20(latest), there are a lot of type error occured in the apiTool.post method.
when I hover the "validateOpenapiRoute" the error message is:
没有与此调用匹配的重载。
最后一个重载给出了以下错误。
类型“MiddlewareHandler”的参数不能赋给类型“H<BlankEnv, "/validate-openapi-schema", BlankInput, HandlerResponse<any>>”的参数。
不能将类型“MiddlewareHandler”分配给类型“MiddlewareHandler<BlankEnv, "/validate-openapi-schema", BlankInput>”。
参数“c”和“c” 的类型不兼容。
类型 "Context<BlankEnv, "/validate-openapi-schema", BlankInput>" 中缺少属性 "#private",但类型 "Context<any, string, {}>" 中需要该属性。ts(2769)
context.d.ts(184, 5): 在此处声明了 "#private"。
types.d.ts(389, 5): 在此处声明最后一个重载。
when I hover the "json" in "c.req.valid('json');" the error message is:
类型“"json"”的参数不能赋给类型“never”的参数。ts(2345)
What is the expected behavior?
No type error.
What do you see instead?
No response
Additional information
When I downgrade hono to 4.6.16, it works well.
The text was updated successfully, but these errors were encountered:
What version of Hono are you using?
4.6.17
What runtime/platform is your app running on? (with version if possible)
Bun workspace
What steps can reproduce the bug?
I am writing one api with hono, and openapi doc with hono-openapi.
The api like:
When I use hono v4.6.16 and hono-openapi v0.4.4, everything works well.
But after I upgrade the hono to v4.6.17 ~ v4.6.20(latest), there are a lot of type error occured in the
apiTool.post
method.What is the expected behavior?
No type error.
What do you see instead?
No response
Additional information
When I downgrade hono to 4.6.16, it works well.
The text was updated successfully, but these errors were encountered: