Runtime expression `name` rule inconsistent with path template grammar
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- markdown
调研方向
结合 OpenAPI 3.2 的路径模板语法,阅读 runtime expression 中针对 name 和 token 的 ABNF 规则。在决定 name 是否应要求一个字符之前,先确定空查询名称是否是有意设计的;完成的标准是语法和规范周边的文字对该决定进行了统一的说明。
由索引模型根据 Issue 内容生成。
描述
The runtime expression ABNF grammar defines:
name = *( char )
token = 1*tchar
The * (zero or more) quantifier on name means expressions like $request.query. and $request.path. with empty names are syntactically valid per the grammar.
The OpenAPI spec states that the Parameter Object's name field is REQUIRED:
REQUIRED. The name of the parameter. Parameter names are case-sensitive.
A required field with an empty string value is arguably not meaningful, though the spec doesn't explicitly say "non-empty".
For path parameters specifically, this is inconsistent with the path template grammar introduced in OpenAPI 3.2.0:
template-expression-param-name = 1*( %x00-7A / %x7C / %x7E-10FFFF )
The 1* quantifier requires at least one character for path parameter names. So {userId} is valid but {} is not. Yet the runtime expression $request.path. (empty name) is accepted by the grammar.
For query parameters, the situation is less clear — HTTP technically allows empty query parameter keys (?=value), though this is extremely uncommon.
For consistency with the path template grammar and the token = 1*tchar rule (which already requires at least one character for headers), consider changing:
name = *( char )
to:
name = 1*( char )
This would require at least one character for query and path parameter names, aligning the runtime expression grammar with the path template grammar.
- 主要语言
- Markdown
- 星标
- 31.2k
- 派生
- 9.2k
- 平均合并
- 2 天 9 小时
- 30 天内合并 PR
- 17
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OAI/OpenAPI-Specification 的其他 Issue
-
Housekeeping
难度 1/5 1 小时以内 新手友好度 45/100
OAI/OpenAPI-Specification#5566 ·
维护者通常 1 天内回复
-
Housekeeping
难度 1/5 1 小时以内 新手友好度 35/100
OAI/OpenAPI-Specification#5562 · 4 条评论 ·
维护者通常 1 天内回复
-
Housekeeping
难度 5/5 一周以上 新手友好度 10/100
OAI/OpenAPI-Specification#5556 · 3 条评论 ·
维护者通常 1 天内回复
-
v3.2.1 release可能重新可做 @lornajane 于 33 天前认领,目前没有进行中的 PR。 未关闭
OAI/OpenAPI-Specification#5460 · 11 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
param serialization
难度 5/5 一周以上 新手友好度 25/100
OAI/OpenAPI-Specification#5366 · 12 条评论 ·
维护者通常 1 天内回复
查看 OAI/OpenAPI-Specification 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
NaturalIntelligence/fast-xml-parser#890 · 1 条评论 ·
维护者通常 3 天内回复
-
enhancement
难度 1/5 1 小时以内 新手友好度 85/100
FujiNetWIFI/fujinet-lib#122 · 1 条评论 ·
维护者通常 1 天内回复
-
effort: low prio: low ready
难度 2/5 1-3 小时 新手友好度 82/100
digitalfabrik/integreat-cms#4616 ·
维护者通常 5 天内回复
-
[BUG] Cloudflare KV binding 模式下 kvDriver.list() 沿用 EdgeOne 语义,字段名不匹配导致 key 格式下初始化 500 并耗尽 list 配额可能已有人在做 @wumingzhinu 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 64/100
OpenListTeam/OpenList-Worker#125 ·
维护者通常 2 天内回复
-
refactor topic-map
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复