Skip to content

Microsoft.ApiManagement/service/policyFragments@2022-04-01-preview - ROUNDTRIP_INCONSISTENT_PROPERTY #21835

Open
@ms-henglu

Description

@ms-henglu

Microsoft.ApiManagement/service/policyFragments@2022-04-01-preview - ROUNDTRIP_INCONSISTENT_PROPERTY

Description

I found differences between PUT request body and GET response:

  • .properties.value: expect
 <fragment>
	<set-header name="custom-header" exists-action="override">
		<value>@{
			return ((666 & 0xFF) << 8).ToString();
		}</value>
	</set-header>
</fragment>

, but got

<fragment>
	<set-header name="custom-header" exists-action="override">
		<value>@{
			return ((666 &amp; 0xFF) &lt;&lt; 8).ToString();
		}</value>
	</set-header>
</fragment>
{
    "properties": {
        "description": "Test policy fragment",
        "format": "rawxml",
        "value": Got "<fragment>\r\n\t<set-header name=\"custom-header\" exists-action=\"override\">\r\n\t\t<value>@{\r\n\t\t\treturn ((666 &amp; 0xFF) &lt;&lt; 8).ToString();\r\n\t\t}</value>\r\n\t</set-header>\r\n</fragment>" in response, expect "<fragment>\n\t<set-header name=\"custom-header\" exists-action=\"override\">\n\t\t<value>@{\n\t\t\treturn ((666 & 0xFF) << 8).ToString();\n\t\t}</value>\n\t</set-header>\n</fragment>\n"
    }
}

Details

  1. ARM Fully-Qualified Resource Type
Microsoft.ApiManagement/service/policyFragments
  1. API Version
2022-04-01-preview
  1. Swagger issue type
Swagger Correctness
  1. OperationId
TODO
e.g., VirtualMachines_Get
  1. Swagger GitHub permalink
TODO, 
e.g., https://github.com/Azure/azure-rest-api-specs/blob/60723d13309c8f8060d020a7f3dd9d6e380f0bbd
/specification/compute/resource-manager/Microsoft.Compute/stable/2020-06-01/compute.json#L9065-L9101
  1. Error code
ROUNDTRIP_INCONSISTENT_PROPERTY
  1. Request traces
PUT https://management.azure.com/subscriptions/{subscription_id}/resourceGroups/henglu129/providers/Microsoft.ApiManagement/service/henglu129/policyFragments/henglu129?api-version=2022-04-01-preview
   Accept: application/json
   Authorization: REDACTED
   Content-Length: 341
   Content-Type: application/json
   User-Agent: HashiCorp Terraform/1.2.8 (+https://www.terraform.io) Terraform Plugin SDK/2.8.0 terraform-provider-azapi/v1.1.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820
   X-Ms-Correlation-Request-Id: REDACTED
   --------------------------------------------------------------------------------
{"properties":{"description":"Test policy fragment","format":"rawxml","value":"\u003cfragment\u003e\n\t\u003cset-header name=\"custom-header\" exists-action=\"override\"\u003e\n\t\t\u003cvalue\u003e@{\n\t\t\treturn ((666 \u0026 0xFF) \u003c\u003c 8).ToString();\n\t\t}\u003c/value\u003e\n\t\u003c/set-header\u003e\n\u003c/fragment\u003e\n"}}
   --------------------------------------------------------------------------------

RESPONSE Status: 202 Accepted
   Cache-Control: no-cache
   Content-Length: 0
   Date: Fri, 09 Dec 2022 04:42:46 GMT
   Expires: -1
   Location: REDACTED
   Pragma: no-cache
   Server: Microsoft-HTTPAPI/2.0
   Strict-Transport-Security: REDACTED
   X-Content-Type-Options: REDACTED
   X-Ms-Correlation-Request-Id: REDACTED
   X-Ms-Ratelimit-Remaining-Subscription-Writes: REDACTED
   X-Ms-Request-Id: e86d35b9-68b9-2c50-c545-e1962c8baf6f
   X-Ms-Routing-Request-Id: REDACTED
   Response contained no body


GET https://management.azure.com/subscriptions/{subscription_id}/resourceGroups/henglu129/providers/Microsoft.ApiManagement/service/henglu129/policyFragments/henglu129?api-version=2022-04-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/v1.1.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820
   X-Ms-Correlation-Request-Id: REDACTED
   --------------------------------------------------------------------------------
   RESPONSE Status: 200 OK
   Cache-Control: no-cache
   Content-Type: application/json; charset=utf-8
   Date: Fri, 09 Dec 2022 04:42:59 GMT
   Etag: "JQkAAAAAAAA="
   Expires: -1
   Pragma: no-cache
   Server: Microsoft-HTTPAPI/2.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: 996ed6f0-b6e1-07c2-ddfa-6325857d9141
   X-Ms-Routing-Request-Id: REDACTED
   --------------------------------------------------------------------------------
{
  "id": "/subscriptions/{subscription_id}/resourceGroups/henglu129/providers/Microsoft.ApiManagement/service/henglu129/policyfragments/henglu129",
  "type": "Microsoft.ApiManagement/service/policyFragments",
  "name": "henglu129",
  "properties": {
    "description": "Test policy fragment",
    "value": "<fragment>\r\n\t<set-header name=\"custom-header\" exists-action=\"override\">\r\n\t\t<value>@{\r\n\t\t\treturn ((666 &amp; 0xFF) &lt;&lt; 8).ToString();\r\n\t\t}</value>\r\n\t</set-header>\r\n</fragment>"
  }
}
   --------------------------------------------------------------------------------

Links

  1. Semantic and Model Violations Reference
  2. S360 action item generator for Swagger issues

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions