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

@hono/zod-openapi

Package Overview
Dependencies
Maintainers
1
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.1.2 to 0.2.0

2

dist/index.d.ts

@@ -54,3 +54,3 @@ import * as openapi3_ts_oas30 from 'openapi3-ts/oas30';

constructor();
openapi: <R extends RouteConfig, I extends Input = InputTypeBase<R, "params", "param"> & InputTypeBase<R, "query", "query"> & InputTypeForm<R> & InputTypeJson<R>, P extends string = ConvertPathType<R["path"]>>(route: R, handler: Handler<E, P, I, OutputType<R>>, hook?: Hook<I, E, P, OutputType<R>> | undefined) => Hono<E, ToSchema<R["method"], P, I["in"], OutputType<R>>, BasePath>;
openapi: <R extends RouteConfig, I extends Input = InputTypeBase<R, "params", "param"> & InputTypeBase<R, "query", "query"> & InputTypeBase<R, "headers", "header"> & InputTypeBase<R, "cookies", "cookie"> & InputTypeForm<R> & InputTypeJson<R>, P extends string = ConvertPathType<R["path"]>>(route: R, handler: Handler<E, P, I, OutputType<R>>, hook?: Hook<I, E, P, OutputType<R>> | undefined) => Hono<E, ToSchema<R["method"], P, I["in"], OutputType<R>>, BasePath>;
getOpenAPIDocument: (config: OpenAPIObjectConfig) => openapi3_ts_oas30.OpenAPIObject;

@@ -57,0 +57,0 @@ doc: (path: string, config: OpenAPIObjectConfig) => void;

@@ -42,2 +42,10 @@ var __accessCheck = (obj, member, msg) => {

}
if (route.request?.headers) {
const validator = zValidator("header", route.request.headers, hook);
validators.push(validator);
}
if (route.request?.cookies) {
const validator = zValidator("cookie", route.request.cookies, hook);
validators.push(validator);
}
const bodyContent = route.request?.body?.content;

@@ -44,0 +52,0 @@ if (bodyContent) {

{
"name": "@hono/zod-openapi",
"version": "0.1.2",
"version": "0.2.0",
"description": "A wrapper class of Hono which supports OpenAPI.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -9,3 +9,2 @@ # Zod OpenAPI Hono

- Currently, it does not support validation of _headers_ and _cookies_.
- An instance of Zod OpenAPI Hono cannot be used as a "subApp" in conjunction with `rootApp.route('/api', subApp)`.

@@ -12,0 +11,0 @@

Sorry, the diff of this file is not supported yet

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