cebe / cebe/php-openapi

References to incorrect components should be considered invalid

Open
#171 1 comment 0 reactions 0 assignees View on GitHub
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.

![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)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.