Sobes.tech
Middle

How to ensure API backward compatibility without versioning? What should not be changed when modifying the contract?

sobes.tech AI

Answer from AI

Backward compatibility without upgrading the API version is achieved by:

  • Adding new optional fields that old clients can ignore.
  • Not deleting or renaming existing fields.
  • Supporting old request and response formats.

What cannot be done when changing the contract:

  • Deleting or changing the meaning of existing fields.
  • Changing the data types of fields.
  • Changing the mandatory status of fields (making mandatory fields optional or vice versa).

Thus, clients using the old API version will continue to work without failures, and new clients can utilize extended functionality.

How to ensure API backward compatibility without… - sobes.tech