Skip to content

Configure route identifiers for subresources #1918

Closed
@lucascourot

Description

@lucascourot

Hi,

is it possible to customize the route identifier names in ApiPlatform when using subresources?

Example:
I want my route
/api/customers/{id}/entity_types/{entityTypes}/layouts
to become
/api/customers/{customerId}/entity_types/{entityTypeId}/layouts
so that I can easily implement a custom SubresourceDataProviderInterface.

I quickly tried to figure out where the magic was done and found out this method

$operation['identifiers'] = [['id', $rootResourceClass, true]];

For me it looks like it's not configurable but I wanted to ask to be sure.

Thanks.

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