Closed dalewking closed 5 years ago
Same thing for responses
@dalewking fixed. Could you please give it a try? Thx!
Someone might complain about the fact that if old has "application/json" on a route and the new one says "*/*"
that is a breaking change even though it is more permissive.
I am running into this with a DELETE route. We have a delete route that accepts a body (containing ID of the user requesting it and a reason for the deletion). So the oldApi has contentType application/json.
It is a bit controversial whether DELETE allows a request body. Some tools think it is like GET and does not allow a body. The spec is somewhat ambiguous. Certain tools do not allow it. Unfortunately, spring-fox which is what is generating our new API from the spring controller annotations for comparison is one of them. Even if you specify a consumes type it strips it off and it ends up going to */*
.
Not sure if I am asking for a change, just thinking out loud.
I mean it's a fair point, although I understand the concern with your specific case.
Anyway, I've implemented the */*
fix.
Say oldAPI contains a path with:
And the new API removes one:
That should be a breaking change since the path no longer accepts xml