This page lists the following examples:
But is there a definition or standard guideline for what changes are considered backwards-compatible. Or in other words, what changes can you make to your contract, and still expect not to break your clients.
A non-breaking change also is known as backward compatibility. For example, newer versions of producers based on the same Business Object can be deployed without breaking existing consumers.
Backward compatibility (sometimes known as backwards compatibility) is a property of an operating system, product, or technology that allows for interoperability with an older legacy system, or with input designed for such a system, especially in telecommunications and computing.
semver specifies the patch version should be updated for "backwards-compatible bug fixes." What is being considered for backwards compatibility? This could be: the documented behaviour of the system. the actual behaviour of the system.
Backward compatibility means that readers with a newer schema can correctly parse data from writers with an older schema. Forwards compatibility means that readers with an older schema can correctly parse data from writers with a newer schema.
I have spent some time on this particular subject, and found some guidelines in a book by Thomas Erl which I refer to at the bottom. Here is what they have to say;
Compatible Changes
Incompatible Changes
There is a great book on this particular subject from Thomas Erl et al; The name is Web Service Contract Design & Versioning for SOA.
HTH.
Disclaimer: As I've mentioned, this is work done by the authors of the book and I'm merely sharing it. I'm also not affiliated in anyway; just liked the book :)
Additional optional request elements (minoccurs=0) could also be backward compatible - this depends on the implementation of the service on the host side. Also, changing a mandatory response element to optional could also be backward compatible - it depends on the implementation of your client.
This area is tricky.
If you are really worried about backward compatibility consider creating a new version of the service for new clients and keep the existing implementation for existing clients. Also, in general, avoid sending domain objects over your services - use DTOs.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With