fix(zod-openapi): import types correctly (#222)

* fix(zod-openapi): import types correctly

* changeset
pull/223/head
Yusuke Wada 2023-10-31 19:17:34 +09:00 committed by GitHub
parent 3633efd1de
commit 73ab82a902
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 8 deletions

View File

@ -0,0 +1,5 @@
---
'@hono/zod-openapi': patch
---
fix: import types correctly

View File

@ -37,7 +37,7 @@
"zod": "3.*" "zod": "3.*"
}, },
"devDependencies": { "devDependencies": {
"hono": "^3.7.2", "hono": "^3.9.1",
"zod": "^3.22.1" "zod": "^3.22.1"
}, },
"dependencies": { "dependencies": {
@ -47,4 +47,4 @@
"engines": { "engines": {
"node": ">=16.0.0" "node": ">=16.0.0"
} }
} }

View File

@ -25,7 +25,7 @@ import type {
ToSchema, ToSchema,
TypedResponse, TypedResponse,
} from 'hono' } from 'hono'
import type { MergePath, MergeSchemaPath } from 'hono/dist/types/types' import type { MergePath, MergeSchemaPath } from 'hono/types'
import type { RemoveBlankRecord } from 'hono/utils/types' import type { RemoveBlankRecord } from 'hono/utils/types'
import type { AnyZodObject, ZodSchema, ZodError } from 'zod' import type { AnyZodObject, ZodSchema, ZodError } from 'zod'
import { z, ZodType } from 'zod' import { z, ZodType } from 'zod'
@ -353,7 +353,7 @@ export class OpenAPIHono<
} }
basePath<SubPath extends string>(path: SubPath): OpenAPIHono<E, S, MergePath<BasePath, SubPath>> { basePath<SubPath extends string>(path: SubPath): OpenAPIHono<E, S, MergePath<BasePath, SubPath>> {
return new OpenAPIHono(super.basePath(path)) return new OpenAPIHono(super.basePath(path) as any)
} }
} }

View File

@ -5954,10 +5954,10 @@ hono@^3.7.3:
resolved "https://registry.yarnpkg.com/hono/-/hono-3.7.3.tgz#01fd88360e9a431235110197fbb5a998131e104e" resolved "https://registry.yarnpkg.com/hono/-/hono-3.7.3.tgz#01fd88360e9a431235110197fbb5a998131e104e"
integrity sha512-BQHdLPXb30hQ9k+04byeSi4QMHk20U1GUq0nT5kGUCGZtxeYhAS7mUJ1wgjn4SCvgiw1rcc6oBOAlwJQ7jQymA== integrity sha512-BQHdLPXb30hQ9k+04byeSi4QMHk20U1GUq0nT5kGUCGZtxeYhAS7mUJ1wgjn4SCvgiw1rcc6oBOAlwJQ7jQymA==
hono@^3.7.2: hono@^3.9.1:
version "3.7.2" version "3.9.1"
resolved "https://registry.yarnpkg.com/hono/-/hono-3.7.2.tgz#c3839d7ffbb5120850b2b926363d065020f4d18c" resolved "https://registry.yarnpkg.com/hono/-/hono-3.9.1.tgz#7a630aad35b8709e10e6117468116d38404ab87e"
integrity sha512-5SWYrAQJlfjHggcDTnmKZd5zlUEXmoUiBjnmL6C1W8MX39/bUw6ZIvfEJZgpo7d7Z/vCJ5FRfkjIQPRH5yV/dQ== integrity sha512-z3nM9CjNZ8PRAH6NNntk4ESKW2POEbGanhK1QpYdQ1MOYRzZPSEE8B5mqw8bYEPa7qIQxX0vtlv7XOxtwFbosg==
hosted-git-info@^2.1.4: hosted-git-info@^2.1.4:
version "2.8.9" version "2.8.9"