Azure-rest-api-specs: [BUG] customDomain.useSubDomainName is served as string instead of boolean

Created on 12 Apr 2019  路  10Comments  路  Source: Azure/azure-rest-api-specs

What is the problem?

There is a discrepancy in Azure REST API and its specifications. When requesting a list of the storage accounts for a given subscription, we get a response containing customDomain.useSubDomainName in string format (such as "true") instead of the expected boolean.

It has been brought to my attention while using the terraform azure provider and we have exchanged about it in this issue.

How to reproduce?

Azure REST api usage example: list all storage accounts for subscription

curl -X GET -H "Authorization: Bearer $AZURE_API_TOKEN" -H "Content-Type: application/json" 'https://management.azure.com/subscriptions/<subscription-id>/providers/Microsoft.Storage/storageAccounts?api-version=2018-07-01'

```json
"customDomain": {
"name": "my-storage",
"useSubDomainName": "true"
}

NOTE: It might be the case for multiple api-version i have only tested `2018-07-01`and `2018-11-01`

# What is expected?

## API Specs for storage accounts
In the `azure-rest-api-spec`, we find that it should be served as a boolean
https://github.com/Azure/azure-rest-api-specs/blob/a1aae618591728f922a59bdcba6303ead4dcf745/specification/storage/resource-manager/Microsoft.Storage/stable/2018-07-01/storage.json#L943
```json
"useSubDomainName": {
          "type": "boolean",
          "description": "Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates."
}
Service Attention Storage bug

Most helpful comment

I have contact SRP team, from SRP team: useSubDomainName only has meaning on PUT, so it should never been returned. Currently it is never returned on GET, but it seems will be returned on list account. So SRP team will fix the server by not return it in list account.
I will update the issue when this is fixed on server.

All 10 comments

This issue is from server.
I have send mail to SRP server team for this issue.
Will update when get responds from them.

I have contact SRP team, from SRP team: useSubDomainName only has meaning on PUT, so it should never been returned. Currently it is never returned on GET, but it seems will be returned on list account. So SRP team will fix the server by not return it in list account.
I will update the issue when this is fixed on server.

Thanks for the response @blueww !

It would be great if someone from that team can be assigned to this ticket

@salameer

@huizlAzure is from SRP team. I have assign the issue to him.

@huizlAzure
Would you please help to follow the issue, and update when the deployment is ready?
Thanks!

@blueww @jhendrixMSFT 馃憢 since this is impacting customers - is there any chance we could prioritise this/get a date for when that's going to be fixed?

I'm following up on an internal thread we have.
See also https://github.com/Azure/azure-sdk-for-go/issues/4473

@tombuildsstuff according to the RP the service has been fixed to no longer return this value. Are you still seeing this happen? If so could you let me know the API version and region?

@jhendrixMSFT sorry missed this ping, based on https://github.com/Azure/azure-sdk-for-go/issues/4473 I think this can now be closed?

Yep thanks for pointing this out.

confirmed! thanks a lot mates! :tada:

Was this page helpful?
0 / 5 - 0 ratings