Skip to content

Commit

Permalink
Enhace special characters replacement (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtirado authored Sep 12, 2023
1 parent dd59835 commit 528a04c
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 528a04c

Please sign in to comment.