fix(zod-openapi): fix the type error (#148)
* fix(zod-openapi): fix the type error * changesetpull/150/head
parent
7fdc882e7c
commit
1bfd648df8
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@hono/zod-openapi': major
|
||||
---
|
||||
|
||||
fix(zod-openapi): fix a type error
|
|
@ -31,7 +31,7 @@
|
|||
"zod": "3.*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"hono": "^3.5.4",
|
||||
"hono": "^3.5.8",
|
||||
"zod": "^3.22.1"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -41,4 +41,4 @@
|
|||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,6 +143,8 @@ type ConvertPathType<T extends string> = T extends `${infer _}/{${infer Param}}$
|
|||
? `/:${Param}`
|
||||
: T
|
||||
|
||||
type HandlerResponse<O> = TypedResponse<O> | Promise<TypedResponse<O>>
|
||||
|
||||
export class OpenAPIHono<
|
||||
E extends Env = Env,
|
||||
S extends Schema = {},
|
||||
|
@ -166,7 +168,7 @@ export class OpenAPIHono<
|
|||
P extends string = ConvertPathType<R['path']>
|
||||
>(
|
||||
route: R,
|
||||
handler: Handler<E, P, I, OutputType<R>>,
|
||||
handler: Handler<E, P, I, HandlerResponse<OutputType<R>>>,
|
||||
hook?: Hook<I, E, P, OutputType<R>>
|
||||
): Hono<E, ToSchema<R['method'], P, I['in'], OutputType<R>>, BasePath> => {
|
||||
this.#registry.registerPath(route)
|
||||
|
|
|
@ -5838,10 +5838,10 @@ hono@^3.5.2:
|
|||
resolved "https://registry.yarnpkg.com/hono/-/hono-3.5.2.tgz#83776c4f076c40f59850105af835a6a5609b7d07"
|
||||
integrity sha512-HezADUIepgTpn+LSHNU2vZd4V2wcFDkObycShxhR37eXwQXgjev9FHsxBpDkvPqGQLn3YAPiC3GNVZVUsbcwFg==
|
||||
|
||||
hono@^3.5.4:
|
||||
version "3.5.4"
|
||||
resolved "https://registry.yarnpkg.com/hono/-/hono-3.5.4.tgz#66057d4c1ee127faafa087168af6d569ab25f5e7"
|
||||
integrity sha512-GrRBIJhZ+tG+8RtoyPQjvqPGwppERmayyTiPKano4egmpkJf1XiptESUYK5vKHICNaJksAKB9jzy1CmOdQENPA==
|
||||
hono@^3.5.8:
|
||||
version "3.5.8"
|
||||
resolved "https://registry.yarnpkg.com/hono/-/hono-3.5.8.tgz#9bbc412f5a54183cf2a81a36a9b9ea56da10f785"
|
||||
integrity sha512-ZipTmGfHm43q5QOEBGog2wyejyNUcicjPt0BLDQ8yz9xij/y9RYXRpR1YPxMpQqeyNM7isvpsIAe9Ems51Wq0Q==
|
||||
|
||||
hosted-git-info@^2.1.4:
|
||||
version "2.8.9"
|
||||
|
|
Loading…
Reference in New Issue