openapi-typescript icon indicating copy to clipboard operation
openapi-typescript copied to clipboard

The `defaultSerializer` adds unwanted quotes when `typeof body === "string"` (due to JSON.stringify)

Open justAnArthur opened this issue 1 month ago • 1 comments

openapi-fetch version

^0.14.1

Description

Code Image

Console Image

Reproduction

undefined

Expected result

The string is already stringified - don't use JSON.stringify when typeof body === 'string'.

Extra

  • [x] I’m willing to open a PR (see CONTRIBUTING.md)
    • [x] PR: https://github.com/openapi-ts/openapi-typescript/pull/2556

justAnArthur avatar Dec 23 '25 12:12 justAnArthur