References to incorrect components should be considered invalid
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 500
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
Expected
Referencing a component that does not meet the criteria an object requires should be considered invalid.
Example
A Response object referencing a component that does not contain a "description" should be considered invalid.

Reasoning
"description" is a REQUIRED property for a Response object.
Actual
Referencing a component that does not meet the criteria an object requires is considered valid.
Example
$api = Reader::readFromJson(<<<JSON
{
"openapi": "3.0.0",
"info": {
"title": "Test API",
"version": "1.0.0"
},
"paths": {
"/path": {
"get": {
"responses": {
"200": {
"\$ref": "#/components/schemas/notAResponse"
}
}
}
}
},
"components": {
"schemas": {
"notAResponse": {
"type": "integer"
}
}
}
}
JSON);
var_dump($api->validate()); // bool(true)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Reader::readFromJson example and the $api->validate() call, then trace how the response $ref is resolved and validated against the referenced component. Add a regression case for a response referencing an invalid schema component; done means validation rejects the example instead of returning true.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100