-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Type of issue
Missing information
Description
The external parameters docs show a code example using WithCustomInput, but the example doesn't include the required #pragma warning disable ASPIREINTERACTION001 pragma.
Without it, the compiler emits:
warning ASPIREINTERACTION001: Type is for evaluation purposes only and is subject to change or removal in future updates.
This is a blocker for developers (especially those using TreatWarningsAsErrors) and for AI coding agents who don't know to add the pragma.
Suggested fix
Add the pragma to the example:
#pragma warning disable ASPIREINTERACTION001
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
});
#pragma warning restore ASPIREINTERACTION001Also consider adding a note explaining:
- This is a preview API (link to tracking issue for stable release if one exists)
- The warning code
ASPIREINTERACTION001and what it means - That
WithDescriptiondoes NOT require the pragma — onlyWithCustomInputdoes
Page URL
Content source URL
https://github.com/microsoft/aspire.dev/blob/main/docs/fundamentals/external-parameters.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels