Skip to content

Commit 61b82ca

Browse files
authored
Merge pull request #721 from michaelversus/patch-1
Fix for not working swift5 --template-dir
2 parents 7262675 + cf46dee commit 61b82ca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/java/io/swagger/codegen/v3/generators/swift/Swift5Codegen.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,14 @@ public Swift5Codegen() {
244244
public void processOpts() {
245245
super.processOpts();
246246

247+
/*
248+
* Template Location. This is the location which templates will be read from. The generator
249+
* will use the resource stream to attempt to read the templates.
250+
*/
251+
if (StringUtils.isBlank(templateDir)) {
252+
embeddedTemplateDir = templateDir = getTemplateDir();
253+
}
254+
247255
// Setup project name
248256
if (additionalProperties.containsKey(PROJECT_NAME)) {
249257
setProjectName((String) additionalProperties.get(PROJECT_NAME));

0 commit comments

Comments
 (0)