Skip to content

Commit 1e3167e

Browse files
authored
Merge pull request #30 from Tijs-2/fix_path_parameter
Fix path parameter
2 parents db731c5 + d402bf2 commit 1e3167e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

generator-core/src/main/java/io/dinject/webroutegen/openapi/MethodDocBuilder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ public void build() {
4444
operation.setDeprecated(true);
4545
}
4646

47-
PathItem pathItem = ctx.pathItem(methodReader.getFullPath());
47+
String path = methodReader.getFullPath().replaceAll("(:)([^/]+)", "{$2}");
48+
PathItem pathItem = ctx.pathItem(path);
49+
4850
switch (methodReader.getWebMethod()) {
4951
case GET:
5052
pathItem.setGet(operation);

0 commit comments

Comments
 (0)