[Schema] SEP-2106: Support JSON Schema 2020-12 vocabulary in SchemaGenerator (oneOf/anyOf/allOf/if-then-else/$ref)
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- php
调研方向
从总 issue #337 和 SEP-2106 开始,然后检查 src/Capability/Discovery/SchemaGenerator.php 和 SchemaValidator.php,以及这里提到的 #[Schema] 属性和 reflection/DocBlock 路径。在评估应如何呈现和验证组合、条件、引用和联合类型之前,先梳理现有的简单 schema 流程。完成的标准是:列出的 JSON Schema 2020-12 词汇在这些路径中均受支持,同时不削弱 same-document $ref 的默认行为。
由索引模型根据 Issue 内容生成。
描述
Implements the vocabulary portion of SEP-2106 for the MCP Spec 2026-07-28 release.
Tracked by umbrella #337.
Spec summary
inputSchemakeepstype: "object"required but accepts any JSON Schema 2020-12 vocabulary (oneOf/anyOf/allOf/not,if/then/else,$ref/$defs/$anchor).
PHP SDK changes
src/Capability/Discovery/SchemaGenerator.phpandSchemaValidator.phpneed to emit/validate full JSON Schema 2020-12 composition, conditionals,$ref(same-document only by default).#[Schema]attribute should accept composition keywords.- Reflection/DocBlock paths today produce simple
{type, properties}only — extend to surface union types asoneOf/anyOf.
Related
- Umbrella #337
- Companion sub-issues: non-object outputSchema,
$refhardening
- 主要语言
- PHP
- 星标
- 1.6k
- 派生
- 173
- 平均合并
- 2 天 49 分钟
- 30 天内合并 PR
- 23
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelcontextprotocol/php-sdk 的其他 Issue
-
[Server] Handler type uses bare Closure, hard to decorate RegistryInterface under strict PHPStan 未关闭Server
难度 1/5 1 小时以内 新手友好度 78/100
modelcontextprotocol/php-sdk#468 · 2 条评论 ·
-
needs confirmation needs maintainer action Server
难度 2/5 1-3 小时 新手友好度 68/100
modelcontextprotocol/php-sdk#398 · 1 个 reaction ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
modelcontextprotocol/php-sdk#370 ·
-
enhancement
难度 4/5 3-5 天 新手友好度 55/100
modelcontextprotocol/php-sdk#510 · 1 条评论 ·
-
bug
难度 4/5 3-5 天 新手友好度 45/100
modelcontextprotocol/php-sdk#504 ·
查看 modelcontextprotocol/php-sdk 的全部 Issue
相似的 Issue
-
priority: p3
难度 2/5 1-3 小时 新手友好度 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
难度 2/5 1-3 小时 新手友好度 78/100
nextcloud/fulltextsearch#1011 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 78/100
phpstan/phpstan-doctrine#794 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
Automattic/static-site-importer#1767 ·