Database.ReadAsync page could be clearer about how the DatabaseResponse returned is implicitly converted to a DatabaseProperties object #30503
Labels
Client
This issue points to a problem in the data-plane of the library.
Cosmos
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
The Database.ReadAsync Docs page appears contradictory and confusing. The summary states:
However, the definition shows the ReadAsync method returning a DatabaseResponse object, not a DatabaseProperties object:
public abstract System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse> ReadAsync(...)
And the example on the page also shows ReadAsync returning a DatabaseResponse object:
DatabaseResponse response = await database.ReadAsync();
After some digging into Docs pages for DatabaseResponse and Response I can see there is an implicit operator that converts from DatabaseResponse to DatabaseProperties, which explains the apparent contradiction in the ReadAsync Docs page.
I think it would be useful to add a note to the ReadAsync page explaining this implicit conversion from DatabaseResponse to DatabaseProperties, or to modify the example to something like:
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: