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

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
主站蜘蛛池模板: 奎屯市| 汾西县| 昂仁县| 奉化市| 大丰市| 凤城市| 云浮市| 图们市| 永年县| 普定县| 资源县| 扬中市| 霸州市| 石棉县| 平潭县| 宾川县| 舞阳县| 科技| 井研县| 承德市| 岳阳县| 永修县| 兴义市| 饶河县| 石阡县| 三江| 扎兰屯市| 七台河市| 辽源市| 顺昌县| 济源市| 招远市| 四会市| 江口县| 陕西省| 建水县| 肥城市| 周至县| 保靖县| 沙坪坝区| 凤阳县|