Skip to content

Commit e853b4e

Browse files
committed
Adjusted pre-existing documentation normalizer tests to new schema dumping
1 parent e5962eb commit e853b4e

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

tests/Swagger/Serializer/DocumentationNormalizerV2Test.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,11 @@ private function doTestNormalize(OperationMethodResolverInterface $operationMeth
343343
'description' => 'This is an initializable but not writable property.',
344344
]),
345345
'dummyDate' => new \ArrayObject([
346-
'type' => 'string',
346+
'type' => ['string', 'null'],
347347
'description' => 'This is a \DateTimeInterface object.',
348348
'format' => 'date-time',
349-
]), ],
349+
]),
350+
],
350351
]),
351352
]),
352353
];
@@ -2018,7 +2019,10 @@ public function testNormalizeWithNestedNormalizationGroups(): void
20182019
]),
20192020
'relatedDummy' => new \ArrayObject([
20202021
'description' => 'This is a related dummy \o/.',
2021-
'$ref' => '#/definitions/'.$relatedDummyRef,
2022+
'oneOf' => [
2023+
['type' => 'null'],
2024+
['$ref' => '#/definitions/'.$relatedDummyRef],
2025+
],
20222026
]),
20232027
],
20242028
]),

tests/Swagger/Serializer/DocumentationNormalizerV3Test.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ private function doTestNormalize(OperationMethodResolverInterface $operationMeth
385385
'description' => 'This is an initializable but not writable property.',
386386
]),
387387
'dummyDate' => new \ArrayObject([
388-
'type' => 'string',
388+
'type' => ['string', 'null'],
389389
'description' => 'This is a \DateTimeInterface object.',
390390
'format' => 'date-time',
391391
]),
@@ -2000,7 +2000,10 @@ public function testNormalizeWithNestedNormalizationGroups(): void
20002000
]),
20012001
'relatedDummy' => new \ArrayObject([
20022002
'description' => 'This is a related dummy \o/.',
2003-
'$ref' => '#/components/schemas/'.$relatedDummyRef,
2003+
'oneOf' => [
2004+
['type' => 'null'],
2005+
['$ref' => '#/components/schemas/'.$relatedDummyRef],
2006+
]
20042007
]),
20052008
],
20062009
]),

0 commit comments

Comments
 (0)