Skip to content

fix(filter): Do not nest array while generating default schema#7832

Open
VincentLanglet wants to merge 2 commits intoapi-platform:4.2from
VincentLanglet:openApiFilterTrait
Open

fix(filter): Do not nest array while generating default schema#7832
VincentLanglet wants to merge 2 commits intoapi-platform:4.2from
VincentLanglet:openApiFilterTrait

Conversation

@VincentLanglet
Copy link
Contributor

@VincentLanglet VincentLanglet commented Mar 9, 2026

Q A
Branch? 4.2
Tickets Closes #..., closes #...
License MIT
Doc PR api-platform/docs#...

I don't fully understand the fix in #7658, especially the part doing

$arraySchema = ['type' => 'array', 'items' => $schema ?? ['type' => 'string']];

unconditionally @soyuka.

When I bump my ApiPlatform, I end up with generated schema of

['type' => 'array', 'items' => ['type' => 'array', 'items' => ['type' => 'string']]];

for something like brand[]=foo, and I don't see it's correct.

To me if the schema is already an array one, we shouldn't wrap it inside another array one.
Am I wrong ?

@VincentLanglet VincentLanglet changed the title fix(filter): Do not nest array fix(filter): Do not nest array while generating default schema Mar 9, 2026
@VincentLanglet VincentLanglet requested a review from soyuka March 9, 2026 21:48
@VincentLanglet VincentLanglet marked this pull request as ready for review March 9, 2026 21:48
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.

1 participant