-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Type of issue
Missing information
Description
The external-parameters docs show how to use WithDescription("...", enableMarkdown: true) alongside WithCustomInput for parameter prompts. However, the example code sets Description = p.Description in the WithCustomInput callback without also setting EnableDescriptionMarkdown = true on the InteractionInput object.
This means the markdown description renders as plain text in the parameter dialog — the enableMarkdown: true flag from WithDescription does not propagate through to the custom input's Description property.
Current example (doesn't render markdown in dialog)
var externalServiceUrl = builder.AddParameter("external-service-url")
.WithDescription("The URL of the external service.")
.WithCustomInput(p => new()
{
InputType = InputType.Text,
Value = "https://example.com",
Name = p.Name,
Placeholder = $"Enter value for {p.Name}",
Description = p.Description
});Fix — add EnableDescriptionMarkdown
var externalServiceUrl = builder.AddParameter("external-service-url")
.WithDescription("The URL of the external service.", enableMarkdown: true)
.WithCustomInput(p => new()
{
InputType = InputType.Text,
Value = "https://example.com",
Name = p.Name,
Placeholder = $"Enter value for {p.Name}",
Description = p.Description,
EnableDescriptionMarkdown = true // <-- needed for markdown to render
});Without EnableDescriptionMarkdown = true on the InteractionInput, any markdown in the description (like links) renders as raw text in the "Set parameter value" dialog.
This was discovered while trying to add a clickable link to a parameter description — it took several attempts to figure out that WithDescription(enableMarkdown: true) only affects the resource list view, not the custom input dialog.
Page URL
Content source URL
https://github.com/microsoft/aspire.dev/blob/main/docs/fundamentals/external-parameters.md