
Answer-first summary for fast verification
Answer: Use a versioning strategy for the APIs that increases the version number on every backward-incompatible change.
The correct answer is C. Google's recommended practice for handling backward-incompatible changes to an API is to use a versioning strategy that increases the version number with every backward-incompatible change. This approach ensures that existing user code does not suddenly break when updates are made to the API. It allows users to continue using the old version while they transition to the new one, ensuring stability and compatibility. More information can be found in Google's API design guidelines: https://cloud.google.com/apis/design/versioning.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your company provides a recommendation engine for retail customers. Retail customers use your API to submit a user ID, and in return, they receive a list of personalized recommendations for that user. You maintain the API lifecycle and need to ensure stability for your customers whenever there are backward-incompatible changes to the API. Following Google-recommended practices for handling such changes is essential. What should you do?
A
Create a distribution list of all customers to inform them of an upcoming backward-incompatible change at least one month before replacing the old API with the new API.
B
Create an automated process to generate API documentation, and update the public API documentation as part of the CI/CD process when deploying an update to the API.
C
Use a versioning strategy for the APIs that increases the version number on every backward-incompatible change.
D
Use a versioning strategy for the APIs that adds the suffix 'DEPRECATED' to the current API version number on every backward-incompatible change. Use the current version number for the new API.
No comments yet.