From 5fdd7de43632b45ee4e7c9410433d80446a67abb Mon Sep 17 00:00:00 2001 From: Adrian Palanques Date: Fri, 30 Jun 2023 19:17:59 +0200 Subject: [PATCH] keep default response in spring codegen --- .../io/swagger/codegen/v3/generators/java/SpringCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/swagger/codegen/v3/generators/java/SpringCodegen.java b/src/main/java/io/swagger/codegen/v3/generators/java/SpringCodegen.java index 29b7276a4f..a6e34d4804 100644 --- a/src/main/java/io/swagger/codegen/v3/generators/java/SpringCodegen.java +++ b/src/main/java/io/swagger/codegen/v3/generators/java/SpringCodegen.java @@ -609,7 +609,7 @@ public Map postProcessOperations(Map objs) { if (responses != null) { for (final CodegenResponse resp : responses) { if ("0".equals(resp.code)) { - resp.code = "200"; + resp.code = "default"; } if (resp.baseType == null) { // set vendorExtensions.x-java-is-response-void to true as baseType is set to "Void"