openapi-typescript
Advanced tools
Comparing version 7.0.0 to 7.0.1
# openapi-typescript | ||
## 7.0.1 | ||
### Patch Changes | ||
- [#1724](https://github.com/openapi-ts/openapi-typescript/pull/1724) [`f47268f`](https://github.com/openapi-ts/openapi-typescript/commit/f47268f38b542b0adf61861efe3fdbf63d0a37f1) Thanks [@simensol](https://github.com/simensol)! - Make sure result is an object before using the in operator. | ||
## 7.0.0 | ||
@@ -4,0 +10,0 @@ |
@@ -148,3 +148,3 @@ import { parseRef } from "@redocly/openapi-core/lib/ref-utils.js"; | ||
const result = options.ctx.transform(schemaObject, options); | ||
if (result) { | ||
if (result && typeof result === "object") { | ||
if ("schema" in result) { | ||
@@ -298,3 +298,3 @@ if (result.questionToken) { | ||
const result = options.ctx.transform(v, options); | ||
if (result) { | ||
if (result && typeof result === "object") { | ||
if ("schema" in result) { | ||
@@ -301,0 +301,0 @@ type = result.schema; |
{ | ||
"name": "openapi-typescript", | ||
"description": "Convert OpenAPI 3.0 & 3.1 schemas to TypeScript", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"author": { | ||
@@ -55,3 +55,2 @@ "name": "Drew Powers", | ||
"@types/js-yaml": "^4.0.9", | ||
"@types/node": "^20.14.6", | ||
"degit": "^2.8.4", | ||
@@ -63,4 +62,3 @@ "del-cli": "^5.1.0", | ||
"typescript": "^5.4.5", | ||
"vite-node": "^1.6.0", | ||
"vitest": "^1.6.0" | ||
"vite-node": "^1.6.0" | ||
}, | ||
@@ -67,0 +65,0 @@ "scripts": { |
@@ -272,3 +272,3 @@ import { parseRef } from "@redocly/openapi-core/lib/ref-utils.js"; | ||
const result = options.ctx.transform(schemaObject, options); | ||
if (result) { | ||
if (result && typeof result === "object") { | ||
if ("schema" in result) { | ||
@@ -474,3 +474,3 @@ if (result.questionToken) { | ||
const result = options.ctx.transform(v as SchemaObject, options); | ||
if (result) { | ||
if (result && typeof result === "object") { | ||
if ("schema" in result) { | ||
@@ -477,0 +477,0 @@ type = result.schema; |
@@ -6,3 +6,2 @@ { | ||
"skipLibCheck": true, | ||
"sourceRoot": ".", | ||
"outDir": "dist", | ||
@@ -9,0 +8,0 @@ "types": ["vitest/globals"] |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
530415
9
10041