TrueNAS API 2.0 response content-type: text/plain

Joined
Feb 21, 2017
Messages
6
I'm trying to use openapi generator to generate go sdk for new terraform provider that I'm working on and I it seems content negotiation does not work. I have proper accept headers asking for application/json and yet all responses from TrueNAS return text/plain format. It would probably be fine if I wrote go client myself, but I'm using generator and it requires response content headers to be application/json for json decoding to work. I could probably make manual patch to the code, but I believe this is incorrect behavior? Thanks for the great product!
 

inman.turbo

Contributor
Joined
Aug 27, 2019
Messages
149
I'm trying to use openapi generator to generate go sdk for new terraform provider that I'm working on and I it seems content negotiation does not work. I have proper accept headers asking for application/json and yet all responses from TrueNAS return text/plain format. It would probably be fine if I wrote go client myself, but I'm using generator and it requires response content headers to be application/json for json decoding to work. I could probably make manual patch to the code, but I believe this is incorrect behavior? Thanks for the great product!

Maybe go to Jira for this? Yes the api returns text/plain, but json would be nice.
 
Joined
Feb 21, 2017
Messages
6
Good point, just now noticed `Report a Bug` button, it was right in front of me all this time, thanks
 
Joined
Feb 21, 2017
Messages
6
Top