Add overload to WithEndpoint WithHttpEndpoint etc that allows you to set DisplayText outside of WithUrl
- 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.
If you're simply trying to name an endpoint you create (in my case, the proxy to a Vite frontend app), it feels a little chunky to do
`WithHttpEndpoint().WithUrlForEndpoint("", => {})`
ie
```
var frontend = builder.AddPnpmApp("frontend", "../frontend")
.WithPnpmPackageInstallation()
.WithReference(ratingsApi)
.WithHttpEndpoint(name: "vite-port", targetPort: 5173)
.WithUrlForEndpoint("vite-port", url =>
{
url.DisplayText = "Frontend (Vite)";
});
```
### Describe the solution you'd like
Would love an overload on WithHttpEndpoint etc that allows passing "DisplayText" as a param, ie
` .WithHttpEndpoint(name: "vite-port", targetPort: 5173, displayText: "Frontend")`
### Additional context
cc @DamianEdwards
Contributor guide
Assessment
This issue has not been assessed yet.