@hono/zod-openapi
Advanced tools
Comparing version 0.14.9 to 0.15.0
@@ -24,3 +24,3 @@ import * as openapi3_ts_oas31 from 'openapi3-ts/oas31'; | ||
}; | ||
type IsJson<T> = T extends string ? T extends `application/json${infer _Rest}` ? 'json' : never : never; | ||
type IsJson<T> = T extends string ? T extends `application/${infer Start}json${infer _End}` ? Start extends '' | `${string}+` | `vnd.${string}+` ? 'json' : never : never : never; | ||
type IsForm<T> = T extends string ? T extends `multipart/form-data${infer _Rest}` | `application/x-www-form-urlencoded${infer _Rest}` ? 'form' : never : never; | ||
@@ -27,0 +27,0 @@ type RequestPart<R extends RouteConfig, Part extends string> = Part extends keyof R['request'] ? R['request'][Part] : {}; |
@@ -102,3 +102,3 @@ "use strict"; | ||
} | ||
if (mediaType.startsWith("application/json")) { | ||
if (/^application\/([a-z-\.]+\+)?json/.test(mediaType)) { | ||
const validator = (0, import_zod_validator.zValidator)("json", schema, hook); | ||
@@ -105,0 +105,0 @@ validators.push(validator); |
{ | ||
"name": "@hono/zod-openapi", | ||
"version": "0.14.9", | ||
"version": "0.15.0", | ||
"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
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
44319