Skip to content

Commit 821675f

Browse files
released v1.0.5
1 parent 0c61079 commit 821675f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "hono-openapi",
33
"description": "OpenAPI schema generator for Hono",
4-
"version": "1.0.4",
4+
"version": "1.0.5",
55
"type": "module",
66
"main": "dist/index.cjs",
77
"module": "dist/index.js",

src/middlewares.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import type {
1818
} from "hono";
1919
import type { TypedResponse } from "hono/types";
2020
import type { StatusCode } from "hono/utils/http-status";
21+
import type { JSONSchema7 } from "json-schema";
2122
import type { OpenAPIV3_1 } from "openapi-types";
2223
import type {
2324
DescribeRouteOptions,
@@ -54,7 +55,8 @@ export function resolver<Schema extends StandardSchemaV1>(
5455
return {
5556
vendor: schema["~standard"].vendor,
5657
validate: schema["~standard"].validate,
57-
toJSONSchema: () => toJsonSchema(schema, options),
58+
toJSONSchema: () =>
59+
toJsonSchema(schema, options) as JSONSchema7 | Promise<JSONSchema7>,
5860
toOpenAPISchema: () => toOpenAPISchema(schema, options),
5961
};
6062
}

0 commit comments

Comments
 (0)