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

Improve validation and casting of request parameters #188

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

bastien-phi
Copy link
Collaborator

Fixes #187

Array query parameters containing objects are not correctly validated because the validator requires the objects to be actual objects and not associative arrays.

The parameter value is now correctly casted.

I also needed to improve parameter casting in order to recursively cast the parameter (in case of objects and arrays). It is not perfect but it's better than before. We could improve it if needed in the future.

@bastien-phi bastien-phi added this to the V2 milestone Mar 8, 2024
@bastien-phi
Copy link
Collaborator Author

@jarrodparkes Can you take a look at this ? Adam is on vacation this week and afk

Copy link
Collaborator

@jarrodparkes jarrodparkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bastien-phi bastien-phi merged commit a9de400 into master Mar 14, 2024
9 checks passed
@bastien-phi bastien-phi deleted the array-of-objects-in-query branch March 14, 2024 07:11
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.

Arrays of objects are not correctly parsed in request parameters
2 participants