Skip to content

Filter Only The Serializable Fields #1096

Open
@ad3n

Description

@ad3n

Api Platform is the best API Framework Ever is used. It's great framework.

Recently, when we activate the filter feature without specific fields defined, for example

bisnis.filter.order_filter:
        parent: 'api_platform.doctrine.orm.order_filter'
        arguments: [ ~ ]
        tags:
            - { name: 'api_platform.filter', id: 'order.filter' }

The Api Platform (see Api Doc) processing all fields based on doctrine metadata even the fields is not displayed. Is good choice to filter only the fields that displayed by serialization not all fields.

Reference: https://github.com/api-platform/core/blob/master/src/Bridge/Doctrine/Orm/Filter/OrderFilter.php#L84

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions