|
18 | 18 |
|
19 | 19 | import io.swagger.v3.oas.models.OpenAPI; |
20 | 20 | import io.swagger.v3.oas.models.media.Schema; |
21 | | -import io.swagger.v3.oas.models.tags.Tag; |
22 | 21 | import org.apache.commons.io.FileUtils; |
23 | 22 | import org.openapitools.codegen.*; |
24 | 23 | import org.openapitools.codegen.model.ModelMap; |
|
32 | 31 | import java.io.File; |
33 | 32 | import java.nio.charset.StandardCharsets; |
34 | 33 | import java.util.*; |
35 | | -import java.util.regex.PatternSyntaxException; |
36 | 34 | import java.util.stream.Collectors; |
37 | 35 | import java.util.stream.Stream; |
38 | 36 |
|
@@ -152,6 +150,7 @@ private String ensureProp(String key, String defaultValue) { |
152 | 150 | return defaultValue; |
153 | 151 | } |
154 | 152 | } |
| 153 | + |
155 | 154 | @Override |
156 | 155 | public void processOpts() { |
157 | 156 | super.processOpts(); |
@@ -521,13 +520,14 @@ static List<ScalaCaskServerCodegen.OperationGroup> createRouteGroups(List<Codege |
521 | 520 |
|
522 | 521 | List<ScalaCaskServerCodegen.OperationGroup> groups = group(operationList); |
523 | 522 | operationList.forEach((op) -> { |
524 | | - for (final ScalaCaskServerCodegen.OperationGroup group : groups) { |
525 | | - // for the usage/call site |
526 | | - final String scalaPath = pathWithBracketPlaceholdersRemovedAndXPathIndexAdded(op); |
527 | | - op.vendorExtensions.put("x-cask-path", scalaPath); |
| 523 | + // for the usage/call site |
| 524 | + final String scalaPath = pathWithBracketPlaceholdersRemovedAndXPathIndexAdded(op); |
| 525 | + op.vendorExtensions.put("x-cask-path", scalaPath); |
528 | 526 |
|
529 | | - final String annotation = "@cask." + op.httpMethod.toLowerCase(Locale.ROOT); |
530 | | - op.vendorExtensions.put("x-annotation", annotation); |
| 527 | + final String annotation = "@cask." + op.httpMethod.toLowerCase(Locale.ROOT); |
| 528 | + op.vendorExtensions.put("x-annotation", annotation); |
| 529 | + |
| 530 | + for (final ScalaCaskServerCodegen.OperationGroup group : groups) { |
531 | 531 | if (!group.contains(op)) { |
532 | 532 | if (op.path.startsWith(group.pathPrefix) && op.httpMethod.equalsIgnoreCase(group.httpMethod)) { |
533 | 533 | group.add(op); |
|
0 commit comments