api: move default response from XML to JSON#2593
api: move default response from XML to JSON#2593marcaurele wants to merge 1 commit intoapache:mainfrom
Conversation
|
This can break compatibility with tools that assume the default return as XML. Should'nt we discuss it first in the |
|
|
||
| try { | ||
|
|
||
| if (HttpUtils.RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) { |
There was a problem hiding this comment.
I think we should keep this, otherwise people won't be able to get XML output if a response type was provided.
There was a problem hiding this comment.
It's some dummy code. The content type is set when writing the String response to the HttpResponse later on. Doing it so early does not have much sense. See HttpUtils.writeHttpResponse()
|
I agree with @rafaelweingartner This would be a rather big change and I think we should discuss it properly. I understand the change, but we will break a lot of things. Do I hear somebody saying CloudStack 5.0? |
|
let's do the 5.0 dance |
|
As we discussed in CCC Montreal, this would fit our requirements for breaking changes. |
|
It will be nearly 3+ years old PR and can't be accepted which would break our default API response compatibility. Pl re-open this PR if this can be reworked again latest main. Thank you for the PR. |
Description
Moving the default response type (when not provided) from XML to JSON.
Java community used to love XML a lot, but let's face it, nowadays people are using JSON whenever they can.
Types of changes
How Has This Been Tested?
Checklist:
Testing