dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.91k stars 475 forks source link

Fix triple slash usage of `inheritdoc`. #6718

Open IEvangelist opened 3 days ago

IEvangelist commented 3 days ago

Description

Many of the container-based hosting integrations include an internal tags class, that stores the various container registry, image and tags. Since these members are internal the .NET Aspire API docs doesn't expose them in the rendered API docs. Nor are they available to IntelliSense.

For example, see RedisBuilderExtensions.AddRedis Method: Remarks.

To fix this, when we rely on <inheritdoc /> we must specify the path (XPath) to the desired value. Before my change:

image

After my change:

image

This will also fix the .NET Aspire API docs too, the next time we release.

Checklist

eerhardt commented 3 days ago

Can you fix these 2 as well?

https://github.com/dotnet/aspire/blob/c0ff16dff269c0d3409c790e287e54e766ba89d9/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIDeployment.cs#L37-L51

eerhardt commented 3 days ago

There are 3 Azure ones that appear to be missed:

https://github.com/dotnet/aspire/blob/c0ff16dff269c0d3409c790e287e54e766ba89d9/src/Aspire.Hosting.Azure.Storage/AzureStorageExtensions.cs#L85

https://github.com/dotnet/aspire/blob/c0ff16dff269c0d3409c790e287e54e766ba89d9/src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBExtensions.cs#L109

https://github.com/dotnet/aspire/blob/c0ff16dff269c0d3409c790e287e54e766ba89d9/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubsExtensions.cs#L81

(Although, that EventHubs one appears misplaced. It should be on the RunAsEmulator method.)

eerhardt commented 3 days ago

Can you make sure this works as expected? This is a 2-level reference:

https://github.com/dotnet/aspire/blob/c0ff16dff269c0d3409c790e287e54e766ba89d9/src/Aspire.Hosting.RabbitMQ/RabbitMQContainerImageTags.cs#L17-L18

https://github.com/dotnet/aspire/blob/c0ff16dff269c0d3409c790e287e54e766ba89d9/src/Aspire.Hosting.RabbitMQ/RabbitMQBuilderExtensions.cs#L114

sebastienros commented 3 days ago

I recently created a PR that was fixing all these. Didn't we merge release/9.0 back to main? Pretty sure I updated everything to use in both the APIs and the tags.

sebastienros commented 3 days ago

Yes, that's it, check the release/9.0, it's fine there: https://github.com/dotnet/aspire/blob/release/9.0/src/Aspire.Hosting.Elasticsearch/ElasticsearchContainerImageTags.cs

sebastienros commented 3 days ago

release/9.0 is fine, but the PR didn't get merged back correctly apparently (conflicts got resolved using main) https://github.com/dotnet/aspire/pull/6433

IEvangelist commented 3 days ago

There might be an issue with the .NET API docs. I'm investigating that and will report back.