[all] Add leading slash in path if missing (#1034)

* [all] Add leading slash in path if missing

* Fix unit Tests
This commit is contained in:
Jérémie Bresson
2018-09-16 10:09:16 +02:00
committed by William Cheng
parent 5fc76ba834
commit 27e343ffef
3 changed files with 39 additions and 13 deletions

View File

@@ -2254,7 +2254,11 @@ public class DefaultCodegen implements CodegenConfig {
}
operationId = removeNonNameElementToCamelCase(operationId);
op.path = path;
if(path.startsWith("/")) {
op.path = path;
} else {
op.path = "/" + path;
}
op.operationId = toOperationId(operationId);
op.summary = escapeText(operation.getSummary());
op.unescapedNotes = operation.getDescription();