Skip to content

Commit 16888c6

Browse files
Enhace special characters replacement (#481) (#483)
Co-authored-by: Francisco Javier Tirado Sarti <[email protected]>
1 parent 798d449 commit 16888c6

File tree

2 files changed

+3378
-1282
lines changed

2 files changed

+3378
-1282
lines changed

deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/wrapper/QuarkusJavaClientCodegen.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import java.net.URL;
55
import java.util.List;
66
import java.util.Map;
7+
import java.util.Map.Entry;
78
import java.util.Optional;
89

910
import org.openapitools.codegen.SupportingFile;
@@ -118,4 +119,16 @@ public void postProcess() {
118119
super.postProcess();
119120
}
120121
}
122+
123+
@Override
124+
protected String getSymbolName(String input) {
125+
for (Entry<String, String> entry : specialCharReplacements.entrySet()) {
126+
if (input.startsWith(entry.getKey())) {
127+
return input.length() > entry.getKey().length()
128+
? entry.getValue() + "_" + input.substring(entry.getKey().length())
129+
: entry.getValue() + "_symbol";
130+
}
131+
}
132+
return null;
133+
}
121134
}

0 commit comments

Comments
 (0)