New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

openapi-typescript

Package Overview
Dependencies
Maintainers
1
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-typescript - npm Package Compare versions

Comparing version 7.1.0 to 7.1.1

6

CHANGELOG.md
# openapi-typescript
## 7.1.1
### Patch Changes
- [#1784](https://github.com/openapi-ts/openapi-typescript/pull/1784) [`c2f8655`](https://github.com/openapi-ts/openapi-typescript/commit/c2f8655c0be5f8131d0ef115724fa4a443c44a8b) Thanks [@yoshi2no](https://github.com/yoshi2no)! - Fix: Correct handling of identical minItems and maxItems in array schemas when arrayLength option is true
## 7.1.0

@@ -4,0 +10,0 @@

9

dist/transform/schema-object.js

@@ -196,3 +196,10 @@ import { parseRef } from "@redocly/openapi-core/lib/ref-utils.js";

estimateCodeSize < 30) {
if (schemaObject.maxItems > 0) {
if (min === max) {
const elements = [];
for (let i = 0; i < min; i++) {
elements.push(itemType);
}
return tsUnion([ts.factory.createTupleTypeNode(elements)]);
}
else if (schemaObject.maxItems > 0) {
const members = [];

@@ -199,0 +206,0 @@ for (let i = 0; i <= (max ?? 0) - min; i++) {

2

package.json
{
"name": "openapi-typescript",
"description": "Convert OpenAPI 3.0 & 3.1 schemas to TypeScript",
"version": "7.1.0",
"version": "7.1.1",
"author": {

@@ -6,0 +6,0 @@ "name": "Drew Powers",

@@ -333,4 +333,10 @@ import { parseRef } from "@redocly/openapi-core/lib/ref-utils.js";

) {
// if maxItems is set, then return a union of all permutations of possible tuple types
if ((schemaObject.maxItems as number) > 0) {
if (min === max) {
const elements: ts.TypeNode[] = [];
for (let i = 0; i < min; i++) {
elements.push(itemType);
}
return tsUnion([ts.factory.createTupleTypeNode(elements)]);
} else if ((schemaObject.maxItems as number) > 0) {
// if maxItems is set, then return a union of all permutations of possible tuple types
const members: ts.TypeNode[] = [];

@@ -337,0 +343,0 @@ // populate 1 short of min …

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