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

openapi-gen-typescript

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-gen-typescript - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

10

dist/index.js

@@ -145,3 +145,4 @@ "use strict";

schemasTypesCode.push(`export type ${schemaKey} = ${transformObject}`);
schemasClassCode.push(`export class ${schemaKey} ${transformObject.replace(/[()]/g, '')}\n`);
const classObject = transformObject.replace(/[()]/g, '').replace(/components.schemas./g, '');
schemasClassCode.push(`export class ${schemaKey} ${classObject}\n`);
});

@@ -301,11 +302,6 @@ }

constants_1.NotModifyCode,
`import fetchImpl from '${path.relative(outputDir, fetchModuleFile).replace(/\.ts$/, '')}';`,
`export namespace components { export namespace schemas { ${schemasTypesCode.join('\n')} } } `,
`export namespace Api { ${pathsCode.join('\n')} } `,
].join('\n');
const schemasCode = [
constants_1.NotModifyCode,
`import { components } from './index';\n`,
schemasClassCode.join('\n'),
].join('\n');
const schemasCode = [constants_1.NotModifyCode, schemasClassCode.join('\n')].join('\n');
fs.writeFileSync(`${outputDir}/index.ts`, util_1.format(typesCode));

@@ -312,0 +308,0 @@ fs.writeFileSync(`${outputDir}/schemas.ts`, util_1.format(schemasCode));

{
"name": "openapi-gen-typescript",
"version": "0.1.8",
"version": "0.1.9",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

@@ -203,3 +203,4 @@ // @ts-ignore

schemasTypesCode.push(`export type ${schemaKey} = ${transformObject}`);
schemasClassCode.push(`export class ${schemaKey} ${transformObject.replace(/[()]/g, '')}\n`);
const classObject = transformObject.replace(/[()]/g, '').replace(/components.schemas./g, '');
schemasClassCode.push(`export class ${schemaKey} ${classObject}\n`);
});

@@ -427,3 +428,2 @@ }

NotModifyCode,
`import fetchImpl from '${path.relative(outputDir, fetchModuleFile).replace(/\.ts$/, '')}';`,
`export namespace components { export namespace schemas { ${schemasTypesCode.join('\n')} } } `,

@@ -433,7 +433,3 @@ `export namespace Api { ${pathsCode.join('\n')} } `,

const schemasCode = [
NotModifyCode,
`import { components } from './index';\n`,
schemasClassCode.join('\n'),
].join('\n');
const schemasCode = [NotModifyCode, schemasClassCode.join('\n')].join('\n');

@@ -440,0 +436,0 @@ fs.writeFileSync(`${outputDir}/index.ts`, format(typesCode));

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