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

@anatine/zod-openapi

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anatine/zod-openapi - npm Package Compare versions

Comparing version 1.14.0 to 1.14.1

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

### [1.14.1](https://github.com/anatine/zod-plugins/compare/zod-openapi-1.14.0...zod-openapi-1.14.1) (2023-06-16)
## [1.14.0](https://github.com/anatine/zod-plugins/compare/zod-openapi-1.13.0...zod-openapi-1.14.0) (2023-05-23)

@@ -7,0 +9,0 @@

2

package.json
{
"name": "@anatine/zod-openapi",
"version": "1.14.0",
"version": "1.14.1",
"description": "Zod to OpenAPI converter",

@@ -5,0 +5,0 @@ "main": "src/index.js",

import { z } from "zod";
import { SchemaObject } from "openapi3-ts";
import { SchemaObject } from "openapi3-ts/oas31";
import { ZodTypeDef } from "zod/lib/types";

@@ -4,0 +4,0 @@ declare module 'zod' {

@@ -1,2 +0,2 @@

import type { SchemaObject } from 'openapi3-ts';
import type { SchemaObject } from 'openapi3-ts/oas31';
import { ZodTypeAny } from 'zod';

@@ -3,0 +3,0 @@ export interface OpenApiZodAny extends ZodTypeAny {

@@ -97,3 +97,3 @@ "use strict";

if (!item.inclusive)
baseSchema.exclusiveMaximum = true;
baseSchema.exclusiveMaximum = item.value;
break;

@@ -103,3 +103,3 @@ case 'min':

if (!item.inclusive)
baseSchema.exclusiveMinimum = true;
baseSchema.exclusiveMinimum = item.value;
break;

@@ -136,3 +136,3 @@ case 'int':

const required = requiredProperties.length > 0 ? { required: requiredProperties } : {};
const result = (0, ts_deepmerge_1.default)(Object.assign(Object.assign({ type: 'object', properties: iterateZodObject({
return (0, ts_deepmerge_1.default)(Object.assign(Object.assign({ type: 'object', properties: iterateZodObject({
zodRef: zodRef,

@@ -142,3 +142,2 @@ schemas,

}) }, required), additionalProperties), zodRef.description ? { description: zodRef.description } : {}, ...schemas);
return result;
}

@@ -145,0 +144,0 @@ function parseRecord({ zodRef, schemas, useOutput, }) {

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