validate() returns true with wrong top level elements
未关闭
enhancement
- 主要语言
- PHP
- 星标
- 500
- 派生
- 99
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi,
I tried to run validate like this:
```
$spec = cebe\openapi\Reader::readFromJson($jsonstring);
$spec->resolveReferences(new cebe\openapi\ReferenceContext($spec, "/"));
$spec->validate();
```
on a OpenAPI 3 schema that has, for example the property "AAAAAcomponents" instead of "components", and the call returns true.
Is this correct?
Thanks,
Frank
贡献指南
这个仓库没有索引到贡献指南
调研方向
使用包含拼写错误的顶层属性(例如 "AAAAAcomponents")的 OpenAPI 3 文档,通过 Reader::readFromJson()、resolveReferences() 和 validate() 重现该示例。检查验证如何处理未知的顶层元素;当行为得到明确且无效文档得到一致处理时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- php
- 领域
- api
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100