cebe / cebe/php-openapi

References to incorrect components should be considered invalid

Aperta
#171 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
PHP
Stelle
500
Fork
99
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## 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)
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
php
Ambito
api
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.