cebe / cebe/php-openapi

References to incorrect components should be considered invalid

Abierto
#171 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
PHP
Estrellas
500
Forks
99
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
php
Área
api
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.