From c8805ce333971d191768e1f82bee8044c750b438 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Thu, 7 May 2020 21:05:45 -0400 Subject: [PATCH] Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java Before we were adding hasPathParams twice, once with !op.pathParams.isEmpty(), and then again with hasPathParams. This was probably caused by a mistaken merge. This is causing the difference in samples Co-authored-by: Richard Whitehouse --- .../org/openapitools/codegen/languages/RustServerCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index d7a3fa7ad6c7..d3d2e4675000 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -736,7 +736,7 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation String vendorExtensionPath = op.path.replace("{", ":").replace("}", ""); op.vendorExtensions.put("x-path",vendorExtensionPath); op.vendorExtensions.put("x-path-id", pathId); - op.vendorExtensions.put("x-has-path-params", !op.pathParams.isEmpty()); + op.vendorExtensions.put("x-has-path-params", hasPathParams); op.vendorExtensions.put("x-path-format-string", formatPath); String vendorExtensionHttpMethod = op.httpMethod.toUpperCase(Locale.ROOT);