validate() returns true with wrong top level elements
- Dominant language
- PHP
- Stars
- 500
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the example through Reader::readFromJson(), resolveReferences(), and validate() using an OpenAPI 3 document with a misspelled top-level property such as "AAAAAcomponents". Inspect how validation handles unknown top-level elements; done means the behavior is clarified and invalid documents are handled consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100