Skip to content

Commit

Permalink
Enhace special characters replacement (#481) (#483)
Browse files Browse the repository at this point in the history
Co-authored-by: Francisco Javier Tirado Sarti <[email protected]>
  • Loading branch information
github-actions[bot] and fjtirado authored Sep 12, 2023
1 parent 798d449 commit 16888c6
Show file tree
Hide file tree
Showing 2 changed files with 3,378 additions and 1,282 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.net.URL;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;

import org.openapitools.codegen.SupportingFile;
Expand Down Expand Up @@ -118,4 +119,16 @@ public void postProcess() {
super.postProcess();
}
}

@Override
protected String getSymbolName(String input) {
for (Entry<String, String> entry : specialCharReplacements.entrySet()) {
if (input.startsWith(entry.getKey())) {
return input.length() > entry.getKey().length()
? entry.getValue() + "_" + input.substring(entry.getKey().length())
: entry.getValue() + "_symbol";
}
}
return null;
}
}
Loading

0 comments on commit 16888c6

Please sign in to comment.