Skip to content

Commit 57d233a

Browse files
committed
fix(laravel): mitigate property metadata read for Error
1 parent da796b9 commit 57d233a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Laravel/ApiResource/Error.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use ApiPlatform\Metadata\ErrorResource;
2020
use ApiPlatform\Metadata\Exception\HttpExceptionInterface;
2121
use ApiPlatform\Metadata\Exception\ProblemExceptionInterface;
22+
use ApiPlatform\Metadata\Link as UriVariableLink;
2223
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface as SymfonyHttpExceptionInterface;
2324
use Symfony\Component\Serializer\Annotation\Groups;
2425
use Symfony\Component\Serializer\Annotation\Ignore;
@@ -28,6 +29,7 @@
2829
#[ErrorResource(
2930
types: ['hydra:Error'],
3031
openapi: false,
32+
uriVariables: ['status'],
3133
operations: [
3234
new Operation(
3335
name: '_api_errors_problem',

0 commit comments

Comments
 (0)