Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for dictionaries #173

Merged
merged 3 commits into from
Jan 29, 2024
Merged

Add support for dictionaries #173

merged 3 commits into from
Jan 29, 2024

Conversation

bastien-phi
Copy link
Collaborator

@bastien-phi bastien-phi commented Jan 27, 2024

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

@bastien-phi bastien-phi marked this pull request as draft January 27, 2024 20:19
@bastien-phi bastien-phi added this to the V2 milestone Jan 27, 2024
@bastien-phi bastien-phi marked this pull request as ready for review January 29, 2024 06:26
@hotmeteor hotmeteor merged commit 7e94dd7 into master Jan 29, 2024
4 checks passed
@hotmeteor hotmeteor deleted the support_dictionnary branch January 29, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dictionary objects break validation 'additionalProperties' are not supported by Spectator?
2 participants