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

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
主站蜘蛛池模板: 扎鲁特旗| 苗栗市| 屯门区| 鄂托克旗| 贺兰县| 衡山县| 贺州市| 贡嘎县| 乳山市| 丹阳市| 文水县| 岐山县| 河南省| 资源县| 桓台县| 大悟县| 延吉市| 德江县| 常州市| 易门县| 甘谷县| 石楼县| 大庆市| 济宁市| 松原市| 江门市| 巴林右旗| 罗平县| 大方县| 扶风县| 左贡县| 双牌县| 靖西县| 扬州市| 宝应县| 敦煌市| 鹿邑县| 元氏县| 长治县| 安国市| 余干县|