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.18.1 to 0.18.2

5

dist/index.d.ts

@@ -7,3 +7,3 @@ import * as openapi3_ts_oas31 from 'openapi3-ts/oas31';

import { MergePath, MergeSchemaPath } from 'hono/types';
import { JSONParsed, RemoveBlankRecord } from 'hono/utils/types';
import { RemoveBlankRecord, SimplifyDeepArray, JSONValue, JSONParsed } from 'hono/utils/types';
import { StatusCode, InfoStatusCode, SuccessStatusCode, RedirectStatusCode, ClientErrorStatusCode, ServerErrorStatusCode } from 'hono/utils/http-status';

@@ -26,2 +26,3 @@ import { ZodError, ZodType, z, ZodSchema } from 'zod';

type IsForm<T> = T extends string ? T extends `multipart/form-data${infer _Rest}` | `application/x-www-form-urlencoded${infer _Rest}` ? 'form' : never : never;
type ReturnJsonOrTextOrResponse<ContentType, Content, Status extends keyof StatusCodeRangeDefinitions | StatusCode> = ContentType extends string ? ContentType extends `application/${infer Start}json${infer _End}` ? Start extends '' | `${string}+` | `vnd.${string}+` ? TypedResponse<SimplifyDeepArray<Content> extends JSONValue ? JSONValue extends SimplifyDeepArray<Content> ? never : JSONParsed<Content> : never, ExtractStatusCode<Status>, 'json'> : never : ContentType extends `text/plain${infer _Rest}` ? TypedResponse<Content, ExtractStatusCode<Status>, 'text'> : Response : never;
type RequestPart<R extends RouteConfig, Part extends string> = Part extends keyof R['request'] ? R['request'][Part] : {};

@@ -74,3 +75,3 @@ type HasUndefined<T> = undefined extends T ? true : false;

type RouteConfigToTypedResponse<R extends RouteConfig> = {
[Status in keyof R['responses'] & RouteConfigStatusCode]: IsJson<keyof R['responses'][Status]['content']> extends never ? TypedResponse<{}, ExtractStatusCode<Status>, string> : TypedResponse<JSONParsed<ExtractContent<R['responses'][Status]['content']>>, ExtractStatusCode<Status>, 'json' | 'text'>;
[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];

@@ -77,0 +78,0 @@ type Hook<T, E extends Env, P extends string, R> = (result: {

2

package.json
{
"name": "@hono/zod-openapi",
"version": "0.18.1",
"version": "0.18.2",
"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