Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hono/zod-openapi

Package Overview
Dependencies
Maintainers
0
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hono/zod-openapi - npm Package Compare versions

Comparing version 0.15.2 to 0.15.3

44

dist/index.js

@@ -104,25 +104,33 @@ "use strict";

const validator = (0, import_zod_validator.zValidator)("json", schema, hook);
const mw = async (c, next) => {
if (c.req.header("content-type")) {
if (isJSONContentType(c.req.header("content-type"))) {
return await validator(c, next);
if (route.request?.body?.required) {
validators.push(validator);
} else {
const mw = async (c, next) => {
if (c.req.header("content-type")) {
if (isJSONContentType(c.req.header("content-type"))) {
return await validator(c, next);
}
}
}
c.req.addValidatedData("json", {});
await next();
};
validators.push(mw);
c.req.addValidatedData("json", {});
await next();
};
validators.push(mw);
}
}
if (isFormContentType(mediaType)) {
const validator = (0, import_zod_validator.zValidator)("form", schema, hook);
const mw = async (c, next) => {
if (c.req.header("content-type")) {
if (isFormContentType(c.req.header("content-type"))) {
return await validator(c, next);
if (route.request?.body?.required) {
validators.push(validator);
} else {
const mw = async (c, next) => {
if (c.req.header("content-type")) {
if (isFormContentType(c.req.header("content-type"))) {
return await validator(c, next);
}
}
}
c.req.addValidatedData("form", {});
await next();
};
validators.push(mw);
c.req.addValidatedData("form", {});
await next();
};
validators.push(mw);
}
}

@@ -129,0 +137,0 @@ }

{
"name": "@hono/zod-openapi",
"version": "0.15.2",
"version": "0.15.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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc