Azure / Azure/azure-rest-api-specs
CdnEndpoint: ID not case sensitive
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
When I create a cdn endpoint resource using following API request, the `ID` returned in response isn't the endpoint of my request. The difference is the `g` in `resourceG(g)roup` segment:
**REQUEST**
```
PUT https://management.azure.com/subscriptions/***/resourceGroups/xcdn-example-resources/providers/Microsoft.Cdn/profiles/example-cdn/endpoints/testep100?api-version=2019-04-15 HTTP/2.0
```
```json
{
"location": "westeurope",
"properties": {
"contentTypesToCompress": [],
"deliveryPolicy": {
"description": "",
"rules": []
},
"geoFilters": [],
"isCompressionEnabled": false,
"isHttpAllowed": true,
"isHttpsAllowed": true,
"originHostHeader": "",
"origins": [
{
"name": "example",
"properties": {
"hostName": "www.contoso.com",
"httpPort": 80,
"httpsPort": 443
}
}
],
"queryStringCachingBehavior": "IgnoreQueryString"
},
"tags": {}
}
```
**RESPONSE**
```json
{
"id": "/subscriptions/***/resourcegroups/xcdn-example-resources/providers/Microsoft.Cdn/profiles/example-cdn/endpoints/testep100",
"location": "WestEurope",
"name": "testep100",
"properties": {
"contentTypesToCompress": [],
"customDomains": [],
"deliveryPolicy": {
"description": "",
"rules": []
},
"geoFilters": [],
"hostName": "testep100.azureedge.net",
"isCompressionEnabled": false,
"isHttpAllowed": true,
"isHttpsAllowed": true,
"optimizationType": null,
"originHostHeader": "",
"originPath": null,
"origins": [
{
"name": "example",
"properties": {
"hostName": "www.contoso.com",
"httpPort": 80,
"httpsPort": 443
}
}
],
"probePath": null,
"provisioningState": "Creating",
"queryStringCachingBehavior": "IgnoreQueryString",
"resourceState": "Creating"
},
"tags": {},
"type": "Microsoft.Cdn/profiles/endpoints"
}
```
The expected behavior is that the `id` in response body should keep the case (i.e. `.../resourceGroups/...`) as specified in request endpoint URL.
Contributor guide
Research direction
Start by reviewing the Azure CDN endpoint request and response shown in the issue, focusing on how the resource-group segment is represented in the returned ID. Trace the relevant CDN API specification entry and determine whether the expected casing is documented or needs correction; done means the specification and any applicable validation or example consistently reflect the intended ID.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100