Azure / Azure/azure-rest-api-specs

Microsoft.Insights/privateLinkScopes/scopedResources@2021-07-01-preview - ROUNDTRIP_INCONSISTENT_PROPERTY

Open
#20,586 0 comments 0 reactions 0 assignees View on GitHub
Insights Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

## Microsoft.Insights/privateLinkScopes/scopedResources@2021-07-01-preview - ROUNDTRIP_INCONSISTENT_PROPERTY

### Description

I found differences between PUT request body and GET response:

- .properties.linkedResourceId: expect /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/henglu95mon/providers/Microsoft.Insights/components/henglu95mon, but got /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/henglu95mon/providers/microsoft.insights/components/henglu95mon

```json
{
"properties": {
"linkedResourceId": Got "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/henglu95mon/providers/microsoft.insights/components/henglu95mon" in response, expect "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/henglu95mon/providers/Microsoft.Insights/components/henglu95mon"
}
}
```

### Details

1. ARM Fully-Qualified Resource Type
```
Microsoft.Insights/privateLinkScopes/scopedResources
```

2. API Version
```
2021-07-01-preview
```

3. Swagger issue type
```
Swagger Correctness
```

4. OperationId
```
TODO
PrivateLinkScopedResources_CreateOrUpdate
```

5. Swagger GitHub permalink
```
https://github.com/Azure/azure-rest-api-specs/blob/332c1c6220f63130bfcc52314963f355dc08b0fd/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/privateLinkScopes_API.json#L1056
```

6. Error code
```
ROUNDTRIP_INCONSISTENT_PROPERTY
```

7. Request traces
```
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/henglu95mon/providers/Microsoft.Insights/privateLinkScopes/henglu95mon/scopedResources/henglu95mon?api-version=2021-07-01-preview
Accept: application/json
Authorization: REDACTED
Content-Length: 168
Content-Type: application/json
User-Agent: HashiCorp Terraform/1.2.8 (+https://www.terraform.io) Terraform Plugin SDK/2.8.0 terraform-provider-azapi/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
X-Ms-Correlation-Request-Id: REDACTED
--------------------------------------------------------------------------------
{"properties":{"linkedResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/henglu95mon/providers/Microsoft.Insights/components/henglu95mon"}}
--------------------------------------------------------------------------------

RESPONSE Status: 200 OK
Access-Control-Expose-Headers: REDACTED
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Mon, 05 Sep 2022 09:08:25 GMT
Expires: -1
Pragma: no-cache
Request-Context: REDACTED
Server: Microsoft-IIS/10.0
Strict-Transport-Security: REDACTED
Vary: REDACTED
X-Content-Type-Options: REDACTED
X-Ms-Correlation-Request-Id: REDACTED
X-Ms-Ratelimit-Remaining-Subscription-Writes: REDACTED
X-Ms-Request-Id: 6caeca96-94df-43b8-8a5e-45c36427b520
X-Ms-Routing-Request-Id: REDACTED
X-Powered-By: REDACTED
--------------------------------------------------------------------------------
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/henglu95mon/providers/microsoft.insights/privatelinkscopes/henglu95mon/scopedresources/henglu95mon",
"name": "henglu95mon",
"type": "microsoft.insights/privatelinkscopes/scopedresources",
"etag": "\"3001eba8-0000-0100-0000-6315bc850000\"",
"systemData": {
"createdBy": "0ddf9866-48e9-4e1d-a880-17a2ea0c9ec6",
"createdByType": "Application",
"createdAt": "2022-09-05T09:08:18.4505186Z",
"lastModifiedBy": "0ddf9866-48e9-4e1d-a880-17a2ea0c9ec6",
"lastModifiedByType": "Application",
"lastModifiedAt": "2022-09-05T09:08:18.4505186Z"
},
"properties": {
"linkedResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/henglu95mon/providers/microsoft.insights/components/henglu95mon",
"provisioningState": "Provisioning"
}
}
--------------------------------------------------------------------------------

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/henglu95mon/providers/Microsoft.Insights/privateLinkScopes/henglu95mon/scopedResources/henglu95mon?api-version=2021-07-01-preview
Accept: application/json
Authorization: REDACTED
User-Agent: HashiCorp Terraform/1.2.8 (+https://www.terraform.io) Terraform Plugin SDK/2.8.0 terraform-provider-azapi/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
X-Ms-Correlation-Request-Id: REDACTED
--------------------------------------------------------------------------------
RESPONSE Status: 200 OK
Access-Control-Expose-Headers: REDACTED
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Mon, 05 Sep 2022 09:08:59 GMT
Expires: -1
Pragma: no-cache
Request-Context: REDACTED
Server: Microsoft-IIS/10.0
Strict-Transport-Security: REDACTED
Vary: REDACTED
X-Content-Type-Options: REDACTED
X-Ms-Correlation-Request-Id: REDACTED
X-Ms-Ratelimit-Remaining-Subscription-Reads: REDACTED
X-Ms-Request-Id: bd1661a6-f9a2-4a63-af91-aa560489c35d
X-Ms-Routing-Request-Id: REDACTED
X-Powered-By: REDACTED
--------------------------------------------------------------------------------
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/henglu95mon/providers/microsoft.insights/privatelinkscopes/henglu95mon/scopedresources/henglu95mon",
"name": "henglu95mon",
"type": "microsoft.insights/privatelinkscopes/scopedresources",
"etag": "\"300133a9-0000-0100-0000-6315bc890000\"",
"systemData": {
"createdBy": "0ddf9866-48e9-4e1d-a880-17a2ea0c9ec6",
"createdByType": "Application",
"createdAt": "2022-09-05T09:08:18.4505186Z",
"lastModifiedBy": "0ddf9866-48e9-4e1d-a880-17a2ea0c9ec6",
"lastModifiedByType": "Application",
"lastModifiedAt": "2022-09-05T09:08:18.4505186Z"
},
"properties": {
"linkedResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/henglu95mon/providers/microsoft.insights/components/henglu95mon",
"provisioningState": "Succeeded"
}
}
--------------------------------------------------------------------------------
```

### Links
1. [Semantic and Model Violations Reference](https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/Semantic-and-Model-Violations-Reference.md)
2. [S360 action item generator for Swagger issues](https://aka.ms/swaggers360)

Contributor guide

Open the contributing guide

Research direction

Start with the linked privateLinkScopes_API.json permalink and the PrivateLinkScopedResources_CreateOrUpdate operation. Read the Semantic and Model Violations Reference, then compare the reported PUT and GET traces to determine whether the discrepancy is representable in the API specification. Done means there is an agreed corrective action and a validating round-trip check.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.