Skip to content

Alias in ApiFilter attribute #7376

@junaidbinfarooq

Description

@junaidbinfarooq

Description:

We are making use of the ApiFilter attribute within our APIs to add filters to different endpoints. The said attribute has an alias property that we could use to map a property of any state object to a different property exposed to the outside world as part of the API. But we see that the said property cannot be used for this purpose.

So, we wonder what the purpose of this alias property is. The documentation doesn't help much either. It does apparently recommend the use of a query parameter over the ApiFilter, but then doesn't elaborate or provide examples of how to do that.

I see there is an issue already opened that has been closed in favor of #2400, but the latter is still open.

API Platform version(s) affected: 3.0

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