Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Array query parameters not correctly handled by OpenAPI UI #8421

Closed

Description

@Dasc3er

Description

When setting a Query Parameter of array type, the OpenAPI UI allows setting multiple values but makes a wrong setup of the actual query parameters (no [] added).

Alternatively, is there a simple way to configure the parsing from Laravel/Symfony to access all provided values? It seems a lot of this is framework and language specific, as other languages support multiple query param with same name as is implemented here.

How to reproduce

#[ApiResource(
    shortName: 'Test',
    operations: [
        new Get(
            parameters: [
                'array' => new QueryParameter(required: false, castToArray: true, schema: ['type' => 'array']),
            ],
        ),
    ],
)]
class Test2Resource
{
    public int $not_id;
}


Image

Possible Solution


curl -X 'GET' \
  'http://localhost/fork/public/api/tests?array=2&array=1&array=4' \
  -H 'accept: application/ld+json'

should be


curl -X 'GET' \
  'http://localhost/fork/public/api/tests?array[]=2&array[]=1&array[]=4' \
  -H 'accept: application/ld+json')

Activity

  1. Dasc3er commented on Aug 15, 2026

    @Dasc3er
    Author

    This seems due to internal PHP query parsing as per https://www.php.net/manual/en/function.parse-str.php#76792

  2. added theissue type on Sep 26, 2026
  3. soyuka commented on Sep 28, 2026

    @soyuka
    Member

    Fixed by #8600, merged into 4.4.

  4. Dasc3er commented on Oct 3, 2026

    @Dasc3er
    Author

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions