@hono/zod-openapi 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as openapi3_ts_oas31 from 'openapi3-ts/oas31';
2
2
  import * as openapi3_ts_oas30 from 'openapi3-ts/oas30';
3
- import { ZodMediaTypeObject, OpenAPIRegistry, RouteConfig as RouteConfig$1, ZodRequestBody, ZodContentObject } from '@asteasolutions/zod-to-openapi';
3
+ import { RouteConfig as RouteConfig$1, ZodMediaTypeObject, OpenAPIRegistry, ZodRequestBody, ZodContentObject } from '@asteasolutions/zod-to-openapi';
4
4
  import { OpenAPIObjectConfig } from '@asteasolutions/zod-to-openapi/dist/v3.0/openapi-generator';
5
- import { TypedResponse, Env, Context, Input, Handler, Schema, Hono, ToSchema, MiddlewareHandler } from 'hono';
5
+ import { MiddlewareHandler, TypedResponse, Env, Context, Input, Handler, Schema, Hono, ToSchema } from 'hono';
6
6
  import { MergePath, MergeSchemaPath } from 'hono/types';
7
7
  import { StatusCode } from 'hono/utils/http-status';
8
8
  import { RemoveBlankRecord } from 'hono/utils/types';
@@ -77,7 +77,7 @@ type RouteHandler<R extends RouteConfig, E extends Env = Env, I extends Input =
77
77
  };
78
78
  };
79
79
  };
80
- } ? RouteConfigToTypedResponse<R> : RouteConfigToTypedResponse<R> | Response | Promise<Response>>;
80
+ } ? MaybePromise<RouteConfigToTypedResponse<R>> : MaybePromise<RouteConfigToTypedResponse<R>> | MaybePromise<Response>>;
81
81
  type RouteHook<R extends RouteConfig, E extends Env = Env, I extends Input = InputTypeParam<R> & InputTypeQuery<R> & InputTypeHeader<R> & InputTypeCookie<R> & InputTypeForm<R> & InputTypeJson<R>, P extends string = ConvertPathType<R['path']>> = Hook<I, E, P, RouteConfigToTypedResponse<R> | Response | Promise<Response> | void | Promise<void>>;
82
82
  type OpenAPIObjectConfigure<E extends Env, P extends string> = OpenAPIObjectConfig | ((context: Context<E, P>) => OpenAPIObjectConfig);
83
83
  declare class OpenAPIHono<E extends Env = Env, S extends Schema = {}, BasePath extends string = '/'> extends Hono<E, S, BasePath> {
@@ -139,4 +139,4 @@ declare const createRoute: <P extends string, R extends Omit<RouteConfig, "path"
139
139
  getRoutingPath(): RoutingPath<R['path']>;
140
140
  };
141
141
 
142
- export { type Hook, OpenAPIHono, type OpenAPIHonoOptions, type OpenAPIObjectConfigure, type RouteConfigToTypedResponse, type RouteHandler, type RouteHook, createRoute };
142
+ export { type Hook, OpenAPIHono, type OpenAPIHonoOptions, type OpenAPIObjectConfigure, type RouteConfig, type RouteConfigToTypedResponse, type RouteHandler, type RouteHook, createRoute };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as openapi3_ts_oas31 from 'openapi3-ts/oas31';
2
2
  import * as openapi3_ts_oas30 from 'openapi3-ts/oas30';
3
- import { ZodMediaTypeObject, OpenAPIRegistry, RouteConfig as RouteConfig$1, ZodRequestBody, ZodContentObject } from '@asteasolutions/zod-to-openapi';
3
+ import { RouteConfig as RouteConfig$1, ZodMediaTypeObject, OpenAPIRegistry, ZodRequestBody, ZodContentObject } from '@asteasolutions/zod-to-openapi';
4
4
  import { OpenAPIObjectConfig } from '@asteasolutions/zod-to-openapi/dist/v3.0/openapi-generator';
5
- import { TypedResponse, Env, Context, Input, Handler, Schema, Hono, ToSchema, MiddlewareHandler } from 'hono';
5
+ import { MiddlewareHandler, TypedResponse, Env, Context, Input, Handler, Schema, Hono, ToSchema } from 'hono';
6
6
  import { MergePath, MergeSchemaPath } from 'hono/types';
7
7
  import { StatusCode } from 'hono/utils/http-status';
8
8
  import { RemoveBlankRecord } from 'hono/utils/types';
@@ -77,7 +77,7 @@ type RouteHandler<R extends RouteConfig, E extends Env = Env, I extends Input =
77
77
  };
78
78
  };
79
79
  };
80
- } ? RouteConfigToTypedResponse<R> : RouteConfigToTypedResponse<R> | Response | Promise<Response>>;
80
+ } ? MaybePromise<RouteConfigToTypedResponse<R>> : MaybePromise<RouteConfigToTypedResponse<R>> | MaybePromise<Response>>;
81
81
  type RouteHook<R extends RouteConfig, E extends Env = Env, I extends Input = InputTypeParam<R> & InputTypeQuery<R> & InputTypeHeader<R> & InputTypeCookie<R> & InputTypeForm<R> & InputTypeJson<R>, P extends string = ConvertPathType<R['path']>> = Hook<I, E, P, RouteConfigToTypedResponse<R> | Response | Promise<Response> | void | Promise<void>>;
82
82
  type OpenAPIObjectConfigure<E extends Env, P extends string> = OpenAPIObjectConfig | ((context: Context<E, P>) => OpenAPIObjectConfig);
83
83
  declare class OpenAPIHono<E extends Env = Env, S extends Schema = {}, BasePath extends string = '/'> extends Hono<E, S, BasePath> {
@@ -139,4 +139,4 @@ declare const createRoute: <P extends string, R extends Omit<RouteConfig, "path"
139
139
  getRoutingPath(): RoutingPath<R['path']>;
140
140
  };
141
141
 
142
- export { type Hook, OpenAPIHono, type OpenAPIHonoOptions, type OpenAPIObjectConfigure, type RouteConfigToTypedResponse, type RouteHandler, type RouteHook, createRoute };
142
+ export { type Hook, OpenAPIHono, type OpenAPIHonoOptions, type OpenAPIObjectConfigure, type RouteConfig, type RouteConfigToTypedResponse, type RouteHandler, type RouteHook, createRoute };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hono/zod-openapi",
3
- "version": "0.12.1",
3
+ "version": "0.13.0",
4
4
  "description": "A wrapper class of Hono which supports OpenAPI.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",