@hono/zod-openapi
Advanced tools
Comparing version 0.18.2 to 0.18.3
@@ -72,5 +72,6 @@ import * as openapi3_ts_oas31 from 'openapi3-ts/oas31'; | ||
type ExtractStatusCode<T extends RouteConfigStatusCode> = T extends keyof StatusCodeRangeDefinitions ? StatusCodeRangeDefinitions[T] : T; | ||
type DefinedStatusCodes<R extends RouteConfig> = keyof R['responses'] & RouteConfigStatusCode; | ||
type RouteConfigToTypedResponse<R extends RouteConfig> = { | ||
[Status in keyof R['responses'] & RouteConfigStatusCode]: undefined extends R['responses'][Status]['content'] ? TypedResponse<{}, ExtractStatusCode<Status>, string> : ReturnJsonOrTextOrResponse<keyof R['responses'][Status]['content'], ExtractContent<R['responses'][Status]['content']>, Status>; | ||
}[keyof R['responses'] & RouteConfigStatusCode]; | ||
[Status in DefinedStatusCodes<R>]: undefined extends R['responses'][Status]['content'] ? TypedResponse<{}, ExtractStatusCode<Status>, string> : ReturnJsonOrTextOrResponse<keyof R['responses'][Status]['content'], ExtractContent<R['responses'][Status]['content']>, Status>; | ||
}[DefinedStatusCodes<R>] | ('default' extends keyof R['responses'] ? undefined extends R['responses']['default']['content'] ? TypedResponse<{}, Exclude<StatusCode, ExtractStatusCode<DefinedStatusCodes<R>>>, string> : ReturnJsonOrTextOrResponse<keyof R['responses']['default']['content'], ExtractContent<R['responses']['default']['content']>, Exclude<StatusCode, ExtractStatusCode<DefinedStatusCodes<R>>>> : never); | ||
type Hook<T, E extends Env, P extends string, R> = (result: { | ||
@@ -77,0 +78,0 @@ target: keyof ValidationTargets; |
{ | ||
"name": "@hono/zod-openapi", | ||
"version": "0.18.2", | ||
"version": "0.18.3", | ||
"description": "A wrapper class of Hono which supports OpenAPI.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52420
689