Skip to content

Allow descriptions on connection string parameters - #18942

Draft
Bhupesh Cholake (RealBhupesh) wants to merge 1 commit into
microsoft:mainfrom
RealBhupesh:codex/connection-string-descriptions
Draft

Bhupesh Cholake (RealBhupesh) wants to merge 1 commit into
microsoft:mainfrom
RealBhupesh:codex/connection-string-descriptions

Conversation

@RealBhupesh

Copy link
Copy Markdown

Summary

  • add WithDescription support to the parameter-based AddConnectionString overload
  • preserve Markdown description support
  • add coverage for the new fluent API

Fixes #18704

Validation

  • dotnet build tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-restore
  • Focused test run was attempted, but the local bundled VSTest host is missing Microsoft.TestPlatform.CommunicationUtilities.

Copilot AI review requested due to automatic review settings July 30, 2026 13:17
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18942

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18942"

@github-actions github-actions Bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Jul 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds description and Markdown support to connection-string parameters.

Changes:

  • Adds a WithDescription overload.
  • Adds focused property coverage.
  • Updates the generated API baseline.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
ParameterResourceBuilderExtensions.cs Adds the fluent API.
AddParameterTests.cs Tests description and Markdown behavior.
api/Aspire.Hosting.cs Records the public API signature.

/// <returns>Resource builder for the connection string parameter.</returns>
/// <exception cref="ArgumentException">The resource is not a parameter resource.</exception>
[AspireExportIgnore(Reason = "Polyglot app hosts use the internal addConnectionString dispatcher export.")]
public static IResourceBuilder<IResourceWithConnectionString> WithDescription(this IResourceBuilder<IResourceWithConnectionString> builder, string description, bool enableMarkdown = false)
Comment on lines +985 to +987

[AspireExportIgnore(Reason = "Polyglot app hosts use the internal addConnectionString dispatcher export.")]
public static ApplicationModel.IResourceBuilder<ApplicationModel.IResourceWithConnectionString> WithDescription(this ApplicationModel.IResourceBuilder<ApplicationModel.IResourceWithConnectionString> builder, string description, bool enableMarkdown = false) { throw null; }

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow setting descriptions on AddConnectionString() parameters

2 participants