From 58dcb72132df1deab2ca58fe82c4c1354d48817d Mon Sep 17 00:00:00 2001 From: Qluxzz Date: Sun, 16 Apr 2023 22:04:51 +0200 Subject: [PATCH] Fix printing empty notes --- .../org/openapitools/codegen/languages/ElmClientCodegen.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java index d60d2dbcb744..3a14bffe4ddc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java @@ -373,6 +373,10 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap operations, L response.isModel = !response.primitiveType; } }); + // an empty string is truthy so we explicitly set empty notes to null + // So we don't print empty notes + if (op.notes != null && op.notes.isEmpty()) + op.notes = null; }); final boolean includeTime = anyOperationResponse(ops, response -> response.isDate || response.isDateTime) ||