Response Content can not be controlled by "Response Content Type" setting
Consider GET method with at least one query. Actual response type (XML or JSON) can't be controlled by "Response Content Type" setting, but can be always toggled between XML and JSON by modifying the query string in Request URL.
For all tests below, I always keep my "Response Content Type" = "application/vnd.yang.collection+json".
Test1: Swagger Curl displays curl -X GET --header 'Accept: application/vnd.yang.collection+json' --header 'Authorization: Basic YWRtaW46YWRtaW4=' 'http://127.0.0.1:8080/api/running' I get JSON "Response Body". This is expected, OK.
Test2: Add one query parameter, Curl displays: curl -X GET --header 'Accept: application/vnd.yang.collection+xml' --header 'Authorization: Basic YWRtaW46YWRtaW4=' 'http://127.0.0.1:8080/api/running?shallow=1' Now I get XML output. This is NOT expected since "Response Content Type" is still "application/vnd.yang.collection+json".
Test3: Repeat same setting as Test1 after Test2, i.e, keep "Response Content Type" unchanged, but without any query parameter. I get JSON "Response Body".
Good news is: Curl display is consistent with the actual response type in version 2.1.4 (fixed by Bug# 1397 for version 2.1.0). The new issue is on "Response Content Type" setting.
The cases can't be always reproduced. After all cache are cleared, things works better. So close the issue for now.