OpenAPITools / OpenAPITools/openapi-generator
[BUG] [QthttpEngine-server] content-type header missing for text/plain responses
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- [x ] Have you provided a full/minimal spec to reproduce the issue?
- [x ] Have you validated the input using an OpenAPI validator (example)?
- [x ] Have you searched for related issues/PRs?
- [x ] What's the actual output vs expected output?
Description
responses that have as return body "text/plain" have the content-type field not set. that cause malfunctions (eg openapi-generator qt-client wont parse the body in that case)
contrary respones with return body "application/json" have content-type and length filed set.
At any rate, the behaviour is not consistent
openapi-generator version
5.4.0
Generation Details
default config
Steps to reproduce
any response that was body-type "text/plain" shall do
Suggest a fix
insert content type for "text/plain" type responses
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the QthttpEngine-server generated response handling and reproduce the difference between text/plain and application/json responses using the issue's minimal case. Done means text/plain responses include a content-type header consistently, with behavior verified against the reported client parsing problem.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100