Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConfigurationSchema only adds a schema for the main resource, not named resources #8377

Open
1 task done
Meir017 opened this issue Mar 28, 2025 · 0 comments
Open
1 task done
Labels
area-integrations Issues pertaining to Aspire Integrations packages

Comments

@Meir017
Copy link
Contributor

Meir017 commented Mar 28, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Consider a sample service with a dependency

<PackageReference Include="Aspire.Azure.Messaging.EventHubs" />

Image

consider I have the following code in my service

builder.AddAzureEventProcessorClient("hub1");

It would be nice having autocomplete in specific event hub configuration, maybe the generated json-schema should have an additional properties where they value can also be the mapping of the object?

no autocomplete here
Image

Expected Behavior

autocomplete for named resource same as the common resource has.

the configuration pattern seems to not only be for azure but all resources

redis:
https://github.com/dotnet/aspire/blob/22d5ec4c07d614c6b5551acf95df4fa9b575d144/src/Components/Aspire.StackExchange.Redis/AspireRedisExtensions.cs
note the binding

  • configSection.Bind(settings) - the common configuration
  • namedConfigSection.Bind(settings); the named configuration
    Image

azure:
https://github.com/dotnet/aspire/blob/f5e596bb038ac396487da4350f78223ebdb9dd26/src/Components/Common/AzureComponent.cs

  • BindSettingsToConfiguration(settings, configSection); - the common configuration
  • BindSettingsToConfiguration(settings, configSection.GetSection(connectionName)); - the named configuration

Image

the gap is the only the common configuration has autocomplete, but the named configuration has no autocomplete

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

No response

@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

No branches or pull requests

1 participant