TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Rolling versions: A new standard for API versioning

6 点作者 subomi大约 1 年前

1 comment

jasonpeacock大约 1 年前
I thought this was something obvious that everyone did? I was definitely doing this 15+ yrs ago when I built web services. It&#x27;s the only path of sanity when you have to support multiple versions at the same time.<p>Neither the article, nor the linked articles, address how to handle actual breaking changes.<p>E.g. when you _require_ new fields that are not present in the old API, you can&#x27;t just hard-code a default value for the old API and use it forever. You must migrate clients to a new API and deprecate the old. Rolling versions doesn&#x27;t magically solve that.<p>I admit, most required fields can be defaulted and clients accept the resulting degraded experience&#x2F;features. This approach does make you really think about what&#x27;s actually a breaking change or not, and if it&#x27;s worth the cost.