forked from loafle/openapi-generator-original
added root checking per #279
This commit is contained in:
parent
e771ed3332
commit
5024e0bbda
@ -502,6 +502,10 @@ public class DefaultCodegen {
|
||||
path = path.replaceAll("\\}", "");
|
||||
String[] parts = (path + "/" + httpMethod).split("/");
|
||||
StringBuilder builder = new StringBuilder();
|
||||
if("/".equals(path)) {
|
||||
// must be root path
|
||||
builder.append("root");
|
||||
}
|
||||
for(int i = 0; i < parts.length; i++) {
|
||||
String part = parts[i];
|
||||
if(part.length() > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user