[BUG] [typescript-axios] empty string body isn't properly JSON serialized
Created by: hectorj
With a typescript-axios generated client, doing a POST
request which expects some JSON. Passing ""
as the body should serialize as ""
(a JSON empty string), but serializes as an empty object instead.
I won't do the whole Bug Report Checklist
because I'll provide a fix quickly.
It is very similar to https://github.com/OpenAPITools/openapi-generator/issues/1432
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)