Skip to content

ExactFilter generate an array on the OpenApi doc #7548

Description

@johndodev

API Platform version(s) affected: 4.2.5

Description
By copy/pasting the code on the doc here : https://api-platform.com/docs/core/doctrine-filters/#exact-filter
it result in an array on the doc :

Image

In my real case, where I want to search on an enum field (string in database, enum in symfony entity), when I search with a possible value, it actually works, but the query string include the [] in the query, which is not ok for production.
https://api.url.com/foo?page=1&itemsPerPage=30&type%5B%5D=bar

If I try to fix that with "schema" (because as it's an enum, I'd like to have a select in the doc, not an input text), it get worse : I can select a value, but it result in a 422 ConstraintViolation (Cette valeur doit être l'un des choix proposés)

Image

and I did not succeeded to make the query parameter not an array.

Also, some links in the doc leads to nothing, like

Activity

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions