Skip to content

openapi_context under xxx_get_subresource not working and wrong default summary #4046

Closed
@TheKassaK

Description

@TheKassaK

API Platform version(s) affected: 2.6.2

Description

I have a subresource : /api/users/ {id}/basket, so I retrieve the Basket resource belong to the user.

With this yml in users.yml :

        api_users_basket_get_subresource:
            security: "is_granted('CAN_GET_SUB_RESOURCE_USER', _api_normalization_context['subresource_resources'])"
            normalization_context:
                without_permissions: true
                groups: [ "basket:read" ]
            openapi_context:
                summary: 'Retrieve the user Basket'

I cant change the summary, seems like openapi_context is ignored.

The default summary is wrong, for this route I have : Retrieves a User resource. instead of Retrieves a Basket resource.

How to reproduce

use a subresource

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions