Skip to content

fix(openapi): document array query params once - #8638

Merged
soyuka merged 2 commits into
api-platform:mainfrom
soyuka:fix/openapi-array-param-single-form
Oct 6, 2026
Merged

soyuka merged 2 commits into
api-platform:mainfrom
soyuka:fix/openapi-array-param-single-form

Conversation

@soyuka

@soyuka soyuka commented Oct 5, 2026

Copy link
Copy Markdown
Member
Q A
Branch? main
Tickets #8634, #8421
License MIT
Doc PR ∅

Follow-up of #8600. A filterless array QueryParameter was documented twice when castToArray is unset: key (form, which describes key=1&key=2, collapsed to the last value by PHP) and key[] with style: deepObject, which OpenAPI only defines for objects.

It is now documented once:

  • castToArray null or true: key[], style: form, explode: true (key[]=1&key[]=2)
  • castToArray: false, or a key already ending with []: the key as written

Includes #8636 (cherry-picked) so the 5.0 merge-up is a no-op. This changes the generated OpenAPI document, hence main only.

soyuka added 2 commits October 5, 2026 17:37
A filterless array query parameter was documented as both
`key` and `key[]` (deepObject). Document it once, as `key[]`
with form/explode, unless castToArray is false.
@soyuka
soyuka merged commit 2bba68f into api-platform:main Oct 6, 2026
114 of 117 checks passed
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