Azure / Azure/azure-sdk-tools

[Prioritized] JSON normalization is not consistent between playback and record

Open
#5,125 2 comments 0 reactions 1 assignee Assigned to @scbedd View on GitHub
Central-EngSys Test-Proxy
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
144

Description

When recording, we attempt to normalize the JSON of the request body as long as it is a [text content type](https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/RecordEntry.cs#L202). When matching in playback, we only normalize the request if the content type [contains "json"](https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/RecordEntry.cs#L129). This can result in playback mismatches when the actual request is valid JSON, but the content type is some other text type. Should be fairly rare in practice but would be good to fix this to be consistent.

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.