Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

API - send/receive API version as header

未关闭
#591 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 7 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞

调研方向

首先阅读 docs/CALENDAR_API.md 中的版本变更日志。明确请求和响应是否使用主版本、对于不受支持的版本应使用哪个状态码,以及服务器是否默认使用最新版本。完成标准是:已记录并实现约定的版本协商行为,并为 v1 和 v2 提供概念验证。

由索引模型根据 Issue 内容生成。

描述

API backend enhancement frontend

The API should include the version number as a header in responses, e.g.

API-Version: 3

(Major version number only?)

Clients would also be encouraged (though not required) to include the version they're using in requests. If the client doesn't specify, the server would assume the latest version. In the future we may rev the version and introduce breaking changes, so clients should send the version they're expecting to ensure a predictable response.

As a proof of concept for handling different versions, we could check for v1 or v2 requests and reject those. (There should be no real requests for those versions, because those version numbers were defined post-hoc well after we were already on v3.) Error status code could be 400, or possibly 406 (Not Acceptable).

主要语言
JavaScript
星标
30
派生
26
平均合并
6 天 23 小时
30 天内合并 PR
3

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

shift-org/shift-docs 的其他 Issue

查看 shift-org/shift-docs 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。