You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

swagger-typescript-api

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-typescript-api - npm Package Compare versions

Comparing version

to
11.0.2

4

CHANGELOG.md
# next release
# 11.0.1
# 11.0.2
- fix: problems with --http-client option in `generate-templates` command
- fix: rewrite file content in `generate-templates` command
- fix: rewrite file content in `generate-templates` command (`--rewrite` flag)

@@ -8,0 +8,0 @@ # 11.0.0

{
"name": "swagger-typescript-api",
"version": "11.0.1",
"version": "11.0.2",
"description": "Generate typescript/javascript api from swagger schema",

@@ -5,0 +5,0 @@ "scripts": {

@@ -65,3 +65,5 @@ const _ = require("lodash");

if (this.config.rewrite || (!templateEjsPathExist && !templateEtaPathExist)) {
const templateNotExist = !templateEjsPathExist && !templateEtaPathExist;
if (templateNotExist) {
this.fileSystem.createFile({

@@ -73,16 +75,18 @@ path: outputPath,

});
} else if (templateEjsPathExist) {
this.fileSystem.createFile({
path: outputPath,
fileName: `${templateName}.ejs`,
content: template.content,
withPrefix: false,
});
} else if (templateEtaPathExist) {
this.fileSystem.createFile({
path: outputPath,
fileName: `${templateName}.eta`,
content: template.content,
withPrefix: false,
});
} else if (this.config.rewrite) {
if (templateEjsPathExist) {
this.fileSystem.createFile({
path: outputPath,
fileName: `${templateName}.ejs`,
content: template.content,
withPrefix: false,
});
} else if (templateEtaPathExist) {
this.fileSystem.createFile({
path: outputPath,
fileName: `${templateName}.eta`,
content: template.content,
withPrefix: false,
});
}
}

@@ -89,0 +93,0 @@ });