Azure / Azure/azure-rest-api-specs

storageAccounts virtualNetworkRules returning wrong case for enum value

Open
#12,408 5 comments 0 reactions 1 assignee Assigned to @zfchen95 View on GitHub
bug
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

Are enum variants case sensitive in the specs? I was expecting them to be. The storage spec says `networkSourceDeleted`, but the service is returning `NetworkSourceDeleted`. Is that a service bug?

``` json
"state": {
"type": "string",
"enum": [
"provisioning",
"deprovisioning",
"succeeded",
"failed",
"networkSourceDeleted"
],
"x-ms-enum": {
"name": "State",
"modelAsString": false
},
"description": "Gets the state of virtual network rule."
}
```

You can see the invalid state returned here:
````
az storage account show --ids /subscriptions/f6be8482-378f-45a6-afb3-d02a7d0fefd7/resourceGroups/aebaid-scpproxy-rg/providers/Microsoft.Storage/storageAccounts/aebaidsestorageaccount --query networkRuleSet.virtualNetworkRules
[
{
"state": "NetworkSourceDeleted",
"virtualNetworkResourceId": "/subscriptions/f6be8482-378f-45a6-afb3-d02a7d0fefd7/resourceGroups/aebaid-scpproxy-rg/providers/Microsoft.Network/virtualNetworks/aebaidse-vnet/subnets/scpproxy-subnet"
}
]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.