Skip to content

Commit 497cb44

Browse files
committed
fix(openapi): correct example usage
In OpenApi both `example` and `examples` keyword exist. The difference relies in the fact that `example` takes one (or more) *anonymous example* whereas `examples` requires *named examples*.
1 parent b213164 commit 497cb44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/State/ApiResource/Error.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function __construct(
104104
identifier: true,
105105
writable: false,
106106
initializable: false,
107-
schema: ['type' => 'number', 'examples' => [404], 'default' => 400]
107+
schema: ['type' => 'number', 'example' => [404], 'default' => 400]
108108
)] private int $status,
109109
?array $originalTrace = null,
110110
private ?string $instance = null,

0 commit comments

Comments
 (0)