From 2d8f127f1f75a7358ecd7e65f7490a4cd7544d5f Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Thu, 2 Nov 2023 15:53:57 +0200 Subject: [PATCH 1/2] Use false for boolean values; not null --- src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt b/src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt index b15949e..9181f1e 100644 --- a/src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt +++ b/src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt @@ -1028,7 +1028,9 @@ class RecipeMarkdownGenerator : Runnable { || option.example.matches(".*:\\s.*".toRegex())) ) { "'" + option.example + "'" - } else { + } else if (option.type == "boolean") { + "false" + }else { option.example } writeln(" ${option.name}: $ex") From 0c5a9832e6c8316bea412a42a617b3946552cfe2 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Thu, 2 Nov 2023 16:07:50 +0100 Subject: [PATCH 2/2] Update src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt Co-authored-by: Mike Solomon --- src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt b/src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt index 9181f1e..f4f34de 100644 --- a/src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt +++ b/src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt @@ -1030,7 +1030,7 @@ class RecipeMarkdownGenerator : Runnable { "'" + option.example + "'" } else if (option.type == "boolean") { "false" - }else { + } else { option.example } writeln(" ${option.name}: $ex")