Skip to content

Commit

Permalink
Sanitize Model Import (OpenAPITools#1411)
Browse files Browse the repository at this point in the history
  • Loading branch information
etherealjoy authored Nov 10, 2018
1 parent 627a9dd commit 5c0a914
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ public String apiFileFolder() {

@Override
public String toModelFilename(String name) {
return initialCaps(toModelName(name));
return sanitizeName(initialCaps(toModelName(name)));
}

@Override
public String toApiFilename(String name) {
return modelNamePrefix + initialCaps(name) + "Api";
return modelNamePrefix + sanitizeName(initialCaps(name)) + "Api";
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ private String requestFileFolder() {

@Override
public String toModelFilename(String name) {
return modelNamePrefix + initialCaps(name);
return modelNamePrefix + sanitizeName(initialCaps(name));
}

@Override
Expand All @@ -322,7 +322,7 @@ public String apiFilename(String templateName, String tag) {

@Override
public String toApiFilename(String name) {
return modelNamePrefix + initialCaps(name) + "ApiHandler";
return modelNamePrefix + sanitizeName(initialCaps(name)) + "ApiHandler";
}

/**
Expand Down

0 comments on commit 5c0a914

Please sign in to comment.