cebe / cebe/php-openapi

References to incorrect components should be considered invalid

オープン
#171 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
PHP
スター
500
フォーク
99
PR マージ指標
30日以内にマージされた PR はありません

説明

## 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.

![image](https://user-images.githubusercontent.com/102669158/197182089-42527d49-7eb4-4753-8c81-525187204b92.png)

### Reasoning
["description" is a **REQUIRED** property for a Response object](https://spec.openapis.org/oas/v3.1.0#response-object).

## Actual
Referencing a component that does not meet the criteria an object requires is considered valid.

### Example

```php
$api = Reader::readFromJson(<<validate()); // bool(true)
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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 の本文から書いたものです。

評価

技術スタック
php
領域
api
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。