Skip to content

Commit

Permalink
Fixes example generation
Browse files Browse the repository at this point in the history
  • Loading branch information
i8beef committed Jan 3, 2021
1 parent 236eb2c commit 4536bf2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public IActionResult Examples([Required] string traitId)
commandExamples.Add(new SchemaExample
{
Comment = $"{commandName}<br/>{commandExample.Comment}",
Example = GetWrappedCommandExample(commandExample.Example)
Example = GetWrappedCommandExample(commandName, commandExample.Example)
});
}
}
Expand Down Expand Up @@ -300,7 +300,7 @@ private string GetWrappedCommandExample(string commandName, string example = nul
sb.AppendLine("{");
sb.Append($" \"{commandName}\": ");

if (example == string.Empty)
if (string.IsNullOrEmpty(example))
{
sb.AppendLine("null");
}
Expand Down

0 comments on commit 4536bf2

Please sign in to comment.