REST API 実装のバージョン 3.0.1 は、ISO 8601 hh:mm:ss 形式を使用して PST 時間で時間値を表します。代わりに、ISO 8601 hh:mm:ss 形式を使用して CEST 時間の時間値を表すように API 実装を変更する必要があります。semver.org のセマンティック バージョニング仕様に従う場合、更新された API 実装にはどのバージョンを割り当てる必要がありますか?
正解:B
4.0.0
*****************************************
As per semver.org semantic versioning specification:
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes.
- MINOR version when you add functionality in a backwards compatible manner.
- PATCH version when you make backwards compatible bug fixes.
As per the scenario given in the question, the API implementation is completely changing its behavior.
Although the format of the time is still being maintained as hh:mm:ss and there is no change in schema w.r.t format, the API will start functioning different after this change as the times are going to come completely different.
Example: Before the change, say, time is going as 09:00:00 representing the PST. Now on, after the change, the same time will go as 18:00:00 as Central European Summer Time is 9 hours ahead of Pacific Time.
>> This may lead to some uncertain behavior on API clients depending on how they are handling the times in the API response. All the API clients need to be informed that the API functionality is going to change and will return in CEST format. So, this considered as a MAJOR change and the version of API for this new change would be 4.0.0