File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import type {
1818} from "hono" ;
1919import type { TypedResponse } from "hono/types" ;
2020import type { StatusCode } from "hono/utils/http-status" ;
21+ import type { JSONSchema7 } from "json-schema" ;
2122import type { OpenAPIV3_1 } from "openapi-types" ;
2223import 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}
You can’t perform that action at this time.
0 commit comments