Azure / Azure/azure-rest-api-specs

DNS Swagger URI does not match ID returned from the API

Open
#5,014 5 comments 0 reactions 0 assignees View on GitHub
Network - DNS Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

👋

We're using the DNS API's (`2018-03-01-preview`) via the Azure SDK for Go which obtains the Resource using the following URL:

```
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}
```

However in the API response the ID segment `dnszones` is returned in lower-case:

```
{
"id": "\/subscriptions\/00000000-0000-0000-0000-000000000000\/resourceGroups\/acctestrg-5300091083452675673\/providers\/Microsoft.Network\/dnszones\/acctestzone5300091083452675673.com",
"name": "acctestzone5300091083452675673.com",
"type": "Microsoft.Network\/dnszones",
"etag": "00000002-0000-0000-4a46-03d8efa8d401",
"location": "global",
"tags": {},
"properties": {
"maxNumberOfRecordSets": 5000,
"maxNumberOfRecordsPerRecordSet": null,
"nameServers": ["ns1-06.azure-dns.com.", "ns2-06.azure-dns.net.", "ns3-06.azure-dns.org.", "ns4-06.azure-dns.info."],
"numberOfRecordSets": 2,
"zoneType": "Public"
}
}
```

Would it be possible to update the URI/Resource ID in the Swagger to use `dnszones` rather than `dnsZones`, so that this matches the API response? In order to use the SDK's Get methods we parse the segments in the ID returned from the Get method for each API

Thanks!

Contributor guide

Open the contributing guide

Research direction

Locate the Swagger definition for the DNS API version 2018-03-01-preview and inspect the resource ID segment currently written as dnsZones. Compare it with the API response shown in the issue; done means the specification uses dnszones so generated SDK Get methods can parse returned resource IDs consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go, openapi
Domain
api, cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.