Open dj-r1 opened 6 days ago
@carjackson-msft Please help take a look, thanks.
Hi @v-jiaodi - in the future, can you please assign these tickets directly to @markjbrown for triaging? I have re-assigned accordingly. CC: @pjohari-ms
I have no idea what the question is here. @dj-r1 can you clarify?
@markjbrown I raise the issue / bug that properties sqlEndpoint
, configurationOverrides
, defaultPriorityLevel
, enablePerRegionPerPartitionAutoscale
, enablePriorityBasedExecution
, minMaxThresholdsForPriorityBasedExecution
shouldn't be included in the response of Azure REST API Database Accounts - Get (Microsoft.DocumentDB) as not defined (in DatabaseAccountGetResults
).
The API docs for our resource provider are autogenerated from our swagger spec. The example output you see is taken from examples/CosmosDBDatabaseAccountGet.json file where our swagger spec is.
Within the swagger spec itself, definition for DatabaseAccountGetProperties also does not list every possible value that can be returned so it also would not be of much help here.
@carjackson-msft and @pjohari-ms, I'd like to get your thoughts on this. Historically, we've not really been exhaustive on documenting these and I've never seen asks from customers to provide explicit api docs/examples on these.
Not sure if there is a low-friction way to update the api-version examples via unit tests. Or if/how the resource definitions in the swagger spec can be updated to provide exhaustive details on return values.
Thanks.
I'm trying to understand if these fields are valid for API. Based on @markjbrown comment, I may presume that ARM-schemas in their Microsoft.DocumentDB.json relied on not complete API spec, or intentionally haven't specified these fields, have they? I see it as a chain of dependencies: Azure-rest-api-specs → ARM template → Bicep → Bicep/ARM WhatIf → me. API returns them to me, so I'd like to identify where it should be suppressed or covered/specified.
API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/cosmos-db.json
API Spec version
2024-02-15-preview, 2023-11-15
Describe the bug
Operation
DatabaseAccounts_Get
in cosmos-db.json, so simple GET DatabaseAccountAs example CosmosDBDatabaseAccountGet.json, response describing a resource, it should be without:
properties.sqlEndpoint
properties.configurationOverrides: {...}
properties.defaultPriorityLevel
properties.enablePerRegionPerPartitionAutoscale
properties.enablePriorityBasedExecution
minMaxThresholdsForPriorityBasedExecution: {...}
There are also examples in Azure REST API for Database Accounts - Get. Found with Microsoft.DocumentDB ARM template/Bicep description.
Using it with Azure Cosmos DB for MongoDB account (RU).
Expected behavior
Actual behavior
Reproduction Steps
az rest --method get --header "Accept=application/json" --url 'https://management.azure.com/subscriptions/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb/resourceGroups/my-rg/providers/Microsoft.DocumentDB/databaseAccounts/my-cosmosdb?api-version=2024-02-15-preview'
|| GEThttps://management.azure.com/subscriptions/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb/resourceGroups/my-rg/providers/Microsoft.DocumentDB/databaseAccounts/my-cosmosdb?api-version=2024-02-15-preview
also with
api-version=2023-11-15
Environment
No response