Closed howiezhao closed 4 months ago
Thank you so much for your time spent on this improvement; with detailed problem description, reference to RFC spec, creating the solution and accompanied by unit-tests.
This is how you do a PR! 🙏
Thanks @howiezhao!
Description
Enhance
fixRequestBody
method to fixContent-Type
includes+json
Motivation and Context
Now, if our Media Type includes
+json
but does not includesapplication/json
, thefixRequestBody
method will not work. For example, the Media Type isapplication/merge-patch+json
.According to RFC 6838, the
+
suffix indicates a structured type. Therefore, for the Media Type includes+json
, we can directly serialize it to JSON.This PR fixes the issue where the
fixRequestBody
method does not work for Media Types includes+json
, such asapplication/merge-patch+json
.How has this been tested?
Unit Test
Types of changes
Checklist: