🚀 Socket Launch Week 🚀 Day 1: Introducing .NET Support in Socket.Learn More →

openapi-typescript

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-typescript - npm Package Compare versions

Comparing version

to
7.0.0-next.7

@@ -49,2 +49,4 @@ # openapi-typescript

- [`799194d `](https://github.com/drwpow/openapi-typescript/commit/799194d98c3934570c6500d986496eee17b79309) Thanks [@drwpow](https://github.com/drwpow)~ - ⚠️ **Breaking** TypeScript is now a peerDependency and must be installed alongside `openapi-typescript`
### Minor Changes

@@ -51,0 +53,0 @@

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

if (typeof value === "string") {
return ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral(value));
return ts.factory.createIdentifier(JSON.stringify(value));
}

@@ -182,0 +182,0 @@ if (typeof value === "number") {

{
"name": "openapi-typescript",
"description": "Convert OpenAPI 3.0 & 3.1 schemas to TypeScript",
"version": "7.0.0-next.6",
"version": "7.0.0-next.7",
"author": {

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

@@ -327,5 +327,6 @@ import { parseRef } from "@redocly/openapi-core/lib/ref-utils.js";

if (typeof value === "string") {
return ts.factory.createLiteralTypeNode(
ts.factory.createStringLiteral(value),
);
// workaround for UTF-8: https://github.com/microsoft/TypeScript/issues/36174
return ts.factory.createIdentifier(
JSON.stringify(value),
) as unknown as ts.TypeNode;
}

@@ -332,0 +333,0 @@ if (typeof value === "number") {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet