How to reduce breaking change In code.

Hi Dayat
1 min readOct 24, 2022

--

Breaking change is happened when you change the code and the application break, others word is your client cannot use your API. Usually, it happens when the change of code involves modifying and deleting part of the existing part of an API.

These are some common examples of breaking change include:

1. Deleting resource or method

2. Deleting response field

3. Modifying a resource or method

4. Modifying field name

5. Modifying required field

If these are the thing that you encounter, these are my advice or best practice that you can do to avoid breaking change

1. Test your code to be breaking change

o There is open tool that you can use to make it easier for you to avoid the breaking change in your code. You can use open-diff tool. This tool can identify or find which of your code can cause the breaking change

2. Documentation

o Documentation is a must if you want to build the application. From doc you can easily predict which input is require or not, how many input is required and many more thing. With documentation also you can pass your job to others without worries.

Hope these article can help programmers out there to write code more efficiency.

--

--