Skip to content

Document WithCommand return-value payloads (Text/Json/Markdown) for Aspire 13.3#1161

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/133-document-command-return-values
Draft

Document WithCommand return-value payloads (Text/Json/Markdown) for Aspire 13.3#1161
Copilot wants to merge 2 commits into
mainfrom
copilot/133-document-command-return-values

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 2, 2026

Aspire 13.3 added support for returning payload data from resource commands, including Markdown rendered in the dashboard response viewer. This PR updates the relevant docs to clearly describe the API contract, dashboard behavior, and release-note messaging.

  • Custom resource commands docs

    • Renames the core section to “Returning a result from a command”.
    • Adds a focused Markdown return example using CommandResultData with CommandResultFormat.Markdown.
    • Aligns wording around ExecuteCommandResult.Data and result formats.
  • Dashboard docs

    • Adds a notification-center note clarifying that Markdown command results are rendered as formatted Markdown in the text visualizer.
    • Reuses the existing response-view screenshot context to anchor the behavior.
  • 13.3 changelog

    • Updates the 13.3 AppHost entry to explicitly call out structured command payloads (Text, Json, Markdown) and the CommandResults.Success(string, CommandResultData) usage pattern.
builder.AddProject<Projects.MyService>("myservice")
    .WithCommand(
        name: "migrate-database",
        displayName: "Migrate Database",
        executeCommand: _ =>
        {
            var markdown = """
                # ⚙️ Database Migration Summary
                | Table | Result |
                |---|---|
                | Customers | ✅ 1,200 rows |
                """;

            return Task.FromResult(CommandResults.Success(
                "Database migrated.",
                new CommandResultData
                {
                    Value = markdown,
                    Format = CommandResultFormat.Markdown
                }));
        });

Copilot AI linked an issue Jun 2, 2026 that may be closed by this pull request
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copilot AI changed the title [WIP] Document command return values in migration summary Document WithCommand return-value payloads (Text/Json/Markdown) for Aspire 13.3 Jun 2, 2026
Copilot AI requested a review from IEvangelist June 2, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[13.3] Document command return values

2 participants