fix : correct Link uriVariables for environment POST endpoint
Use toProperty + identifiers instead of fromProperty to resolve application slug correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,7 @@ use Symfony\Component\Serializer\Attribute\Groups;
|
||||
new Post(
|
||||
uriTemplate: '/applications/{slug}/environments',
|
||||
uriVariables: [
|
||||
'slug' => new Link(fromClass: Application::class, fromProperty: 'environments'),
|
||||
'slug' => new Link(toProperty: 'application', fromClass: Application::class, identifiers: ['slug']),
|
||||
],
|
||||
security: "is_granted('ROLE_ADMIN')",
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user