Skip to content

Commit 0cd0013

Browse files
committed
fix: fix openapi errors
1 parent 61c6dee commit 0cd0013

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/State/ApiResource/Error.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function __construct(
127127
identifier: true,
128128
writable: false,
129129
initializable: false,
130-
schema: ['type' => ['number', 'null'], 'examples' => [404], 'default' => 400]
130+
schema: ['type' => ['integer', 'null'], 'examples' => [404], 'default' => 400]
131131
)] private ?int $status,
132132
?array $originalTrace = null,
133133
private ?string $instance = null,

tests/Fixtures/TestBundle/Entity/Issue5793/BagOfTests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class BagOfTests
3737
#[Groups(['read', 'write'])]
3838
// ignore "type" schema property to ensure "schema" is properly overridden
3939
// see JsonSchemaGenerateCommandTest::testArraySchemaWithReference
40-
#[ApiProperty(schema: ['maxLength' => 255])]
40+
#[ApiProperty(schema: ['type' => 'string', 'maxLength' => 255])]
4141
private ?string $description = null;
4242

4343
#[ORM\OneToMany(mappedBy: 'bagOfTests', targetEntity: TestEntity::class)]

0 commit comments

Comments
 (0)