hotmeteor / spectator

OpenAPI testing for PHP
MIT License
285 stars 53 forks source link

Add support for dictionaries #173

Closed bastien-phi closed 9 months ago

bastien-phi commented 9 months ago

Dictionaries are objects in which the keys are not known but we can still validate the format of the values.

For example :

{
    "data": {
        "2024-01-27": 6,
        "2024-01-28": 7
    }
}

Before this fix, we had the error

ErrorException: Undefined property: stdClass::$properties
/spectator/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:255
/spectator/src/Validation/AbstractValidator.php:72
/spectator/src/Validation/AbstractValidator.php:114
....

Fixes #143 Fixes #167