aspire icon indicating copy to clipboard operation
aspire copied to clipboard

Ensure JSON schema files in Aspire component packages provide a description for all declared nodes

Open DamianEdwards opened this issue 2 years ago • 3 comments

When component packages provide JSON schema, they should ensure they're providing a meaningful description for every node in the configuration schema, so that a good UX is provided to users in the JSON editor. For example, if all Aspire contribute schema under a root "Aspire" node, e.g. "Aspire": { "Caching": { "Redis": ..., they should all be defining the "Aspire" node with the same description. The tooling will simply take the last description it found for a node based on all the schema parts contributed by packages, so ensuring they're all aligned will provide a consistent UX.

DamianEdwards avatar Sep 21 '23 21:09 DamianEdwards

@DamianEdwards - do you think this is necessary for 8.0?

With the generator, the starting path is provided in the assembly level attribute:

https://github.com/dotnet/aspire/blob/fc1dd495456cea3c1b0cf583c05fd18e3052a3f2/src/Components/Aspire.StackExchange.Redis/AssemblyInfo.cs#L8-L9

We can have a set of common descriptions and pass them in here. I'm just not sure how much value this will provide. The only thing missing today is the top few namespaces Aspire and StackExchange in the case above. The Redis section has description:

https://github.com/dotnet/aspire/blob/fc1dd495456cea3c1b0cf583c05fd18e3052a3f2/src/Components/Aspire.StackExchange.Redis/ConfigurationSchema.json#L181

Image

eerhardt avatar Feb 26 '24 22:02 eerhardt

Could we do it by having multiple schema files in the packages, split by "level"? So we can have a central schema file defined for the "Aspire" node, which is configured into all our packages by our tool/build process, and if desired we can do so for intermediate levels.

DamianEdwards avatar Feb 29 '24 00:02 DamianEdwards

This doesn't seem like a ship-stopping issue. Moving to 8.1.

eerhardt avatar Apr 02 '24 21:04 eerhardt