swagger-typescript-api
Advanced tools
Comparing version
# 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 @@ }); |
258954
0.05%4357
0.07%