microsoft / microsoft/aspire

Allow setting descriptions on AddConnectionString() parameters

Open
#18,704 0 comments 0 reactions 0 assignees View on GitHub
area-integrations
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

Aspire provides a nice `builder.AddConnectionString("SomeDatabase")` method which adds a new parameter to the app model. But unlike other parameters I'm unable to set a description on it using WithDescription. I believe this is because `AddConnectionString()` returns an `IResourceBuilder()` even though the actual resource being added is a `ConnectionStringParameterResource` which inherits from `ParameterResource`.

### Describe the solution you'd like

It would be nice if we can set custom descriptions on these parameters as well so that I can guide developers to filling in the right values.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at AddConnectionString and WithDescription, then trace the IResourceBuilder return type to ConnectionStringParameterResource and ParameterResource. Check nearby parameter-resource tests before changing the API, and confirm that a custom description can be set on an AddConnectionString result.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.