Skip to content

Multiple GetCollection actions with different filters #2419

@vazgen

Description

@vazgen

Hello, I have an entity called book and I added 2 GetCollection actions.

  1. the first one is using regular ApiFilters
  2. the second one is being used for book recommendations that does not need the default filters.
new GetCollection(
        normalizationContext: [
            'openapi_definition_name' => ModelInterface::LIST,
            'groups' => [...Book::GROUP_LIST],
            'skip_null_values' => false,
        ]),
    new GetCollection(
        uriTemplate: '/book-recommendation',
        controller: BookRecommendationAction::class,
        normalizationContext: [
            'openapi_definition_name' => ModelInterface::LIST,
            'groups' => [...Book::GROUP_LIST],
            'skip_null_values' => false,
        ],
        security: 'is_granted("ROLE_USER")',
    ),

Is it possible to remove ApiFilters for the second action?

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