-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Labels
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Generated code attempts to use JSON to read a text/plain string response.
openapi-generator version
Used docker latest version
REPOSITORY TAG IMAGE ID CREATED SIZE
openapitools/openapi-generator-cli latest ec2c9381a2be 2 days ago 303MB
OpenAPI declaration file content or url
Generation Details
Results in this function
The function attemps to do serde_json::from_str(&content).map_err(Error::from) on a response marked text/plain, which causes crash (since the json expects to see a quote surrounded string, not a plain string)
Expected output: return Ok(content.to_string()) instead of attempting json parse of text/plain response
Steps to reproduce
Related issues/PRs
Nothing about text/plain vs. json confusion
Suggest a fix
IanGallacher