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

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
主站蜘蛛池模板: 杭锦旗| 景洪市| 大关县| 晋城| 基隆市| 承德县| 金阳县| 海门市| 乌审旗| 安化县| 灌南县| 肇庆市| 密山市| 潼关县| 鄱阳县| 米脂县| 滁州市| 玛纳斯县| 永仁县| 龙井市| 永平县| 临夏市| 岳西县| 中牟县| 宁强县| 东乡族自治县| 永仁县| 敦煌市| 蛟河市| 方山县| 正蓝旗| 开化县| 莲花县| 电白县| 封丘县| 孝昌县| 揭阳市| 广宁县| 万安县| 卢龙县| 长治市|