mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-18 10:09:10 +00:00
[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:
committed by
William Cheng
parent
5fc76ba834
commit
27e343ffef
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user