References to incorrect components should be considered invalid
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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)
- 主要言語
- PHP
- スター
- 500
- フォーク
- 99
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cebe/php-openapi のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
cebe/php-openapi#250 ·
-
BC break in 1.8 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
cebe/php-openapi#247 · コメント 1 件 · リアクション 1 件 ·
-
php 8.4 deprecations オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
cebe/php-openapi#245 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
cebe/php-openapi#242 · コメント 6 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
cebe/php-openapi#238 ·
cebe/php-openapi の issue をすべて見る
似ている issue
-
tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
UX
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
bug customer-reported
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MagnaCapax/PMSS#949 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Automattic/static-site-importer#1829 ·