You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is caused by the usage of the parse_str function, which can only handle PHP-style query args and turns multiple arguments with the same name into a string with the last value ("bar"):
There are several ways to express arrays in query strings:
The array
may be serialized into
list[]=foo&list[]=bar
orlist=foo&list=bar
.Depending on the server backend, the latter variant may be required. When using this format though, request validation breaks:
openapi-psr7-validator/src/PSR7/Validators/SerializedParameter.php
Lines 174 to 176 in 5f98f98
Invalid argument supplied for foreach()
The issue is caused by the usage of the
parse_str
function, which can only handle PHP-style query args and turns multiple arguments with the same name into a string with the last value ("bar"):openapi-psr7-validator/src/PSR7/Validators/QueryArgumentsValidator.php
Line 74 in 5f98f98
This drawback is also mentioned in the user contributed notes of the
parse_str
documentation.The objective would be to properly parse all array query string formats that are mentioned in the OpenAPI Guide.
The text was updated successfully, but these errors were encountered: