Bug Report Checklist
Description
What's the point of removing all Accept headers not matching sth. like application/json? ->see HeaderSelector::selectAcceptHeader()
By truncating all but the json content types the endpoint specified in the YAML below isn't reachable:
The sunny case (aka HTTP 200) only delivers application/octet-stream -> if requested with Accept: application/json it fails with 406 Not acceptable according to RFC 2616.
I assume to understand the intention of HeaderSelector::selectAcceptHeader(): prioritize application/json as the PHP client only can interpret / deserialize JSON responses.
However, there are services which may respond with non-JSON, especially with a plain file which the client can handle as well.
openapi-generator version
OpenAPI declaration file content or url
https://gist.github.com/Pittiplatsch/d345dcdd40027e2ef31fc71213626373
Generation Details
No special configuration needed.
Steps to reproduce
Just generate PHP client according to documentation.
Related issues/PRs
#4684
#5163
Suggest a fix
Maybe some kind of prioritizing via quality values might help?
This of course requires the server to interpret them correctly.
Bug Report Checklist
Description
What's the point of removing all
Acceptheaders not matching sth. likeapplication/json? ->seeHeaderSelector::selectAcceptHeader()By truncating all but the
jsoncontent types the endpoint specified in the YAML below isn't reachable:The sunny case (aka HTTP 200) only delivers
application/octet-stream-> if requested withAccept: application/jsonit fails with406 Not acceptableaccording to RFC 2616.I assume to understand the intention of
HeaderSelector::selectAcceptHeader(): prioritizeapplication/jsonas the PHP client only can interpret / deserialize JSON responses.However, there are services which may respond with non-JSON, especially with a plain file which the client can handle as well.
openapi-generator version
OpenAPI declaration file content or url
https://gist.github.com/Pittiplatsch/d345dcdd40027e2ef31fc71213626373
Generation Details
No special configuration needed.
Steps to reproduce
Just generate PHP client according to documentation.
Related issues/PRs
#4684
#5163
Suggest a fix
Maybe some kind of prioritizing via quality values might help?
This of course requires the server to interpret them correctly.