官术网_书友最值得收藏!

Versioning APIs

API versioning is something you should think about from the very beginning and avoid as long as you can. In general, you will need to make changes to your API, however, having to maintain n different versions can be a royal pain in the backside, so doing the upfront design thinking at the beginning can save you a whole load of trouble.

Before we look at how you can version your API, which is quite straightforward let's look at when you should version.

You would increment your API version number when you introduce a breaking change.

Breaking changes include:

  • Removing or renaming APIs or API parameters
  • Changing the type of an API parameter, for example, from integer to string
  • Changes to response codes, error codes, or fault contracts
  • Changes to the behavior of an existing API

Things that do not involve a breaking change include:

  • Adding parameters to a returned entity
  • Adding additional endpoints or functionality
  • Bug fixes or other maintenance that does not include items in the breaking changes list
主站蜘蛛池模板: 鸡泽县| 泗阳县| 郑州市| 布拖县| 巴彦淖尔市| 葫芦岛市| 碌曲县| 法库县| 潮州市| 新安县| 江达县| 肇州县| 即墨市| 台北市| 延川县| 增城市| 齐河县| 双牌县| 肥西县| 闻喜县| 临夏市| 商水县| 福建省| 东乡族自治县| 兴海县| 枝江市| 永吉县| 稻城县| 庆云县| 扎赉特旗| 陇南市| 广昌县| 湖北省| 庆阳市| 淅川县| 安泽县| 曲阳县| 衢州市| 民丰县| 石嘴山市| 合川市|