OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
vendor
/
zircote
/
swagger-php
/
tests
/
Annotations
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:33 AM
rwxr-xr-x
📄
AbstractAnnotationTest.php
5.79 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
AnnotationPropertiesDefinedTest.php
822 bytes
08/07/2024 04:34:31 AM
rw-r--r--
📄
AttachableTest.php
1.48 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
AttributesSyncTest.php
7.67 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
ComponentsTest.php
663 bytes
08/07/2024 04:34:31 AM
rw-r--r--
📄
ItemsTest.php
1.84 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
LicenseTest.php
838 bytes
08/07/2024 04:34:31 AM
rw-r--r--
📄
NestedPropertyTest.php
1.73 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
OpenApiTest.php
1.23 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
OperationTest.php
1.77 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
ResponseTest.php
1.08 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
SecuritySchemesTest.php
4.05 KB
08/07/2024 04:34:31 AM
rw-r--r--
📄
ValidateRelationsTest.php
1.66 KB
08/07/2024 04:34:31 AM
rw-r--r--
Editing: NestedPropertyTest.php
Close
<?php declare(strict_types=1); /** * @license Apache 2.0 */ namespace OpenApi\Tests\Annotations; use OpenApi\Generator; use OpenApi\Processors\AugmentProperties; use OpenApi\Processors\AugmentSchemas; use OpenApi\Processors\MergeIntoComponents; use OpenApi\Processors\MergeIntoOpenApi; use OpenApi\Tests\OpenApiTestCase; class NestedPropertyTest extends OpenApiTestCase { public function testNestedProperties(): void { $analysis = $this->analysisFromFixtures(['NestedProperty.php']); $analysis->process([ new MergeIntoOpenApi(), new MergeIntoComponents(), new AugmentSchemas(), new AugmentProperties(), ]); $this->assertCount(1, $analysis->openapi->components->schemas); $schema = $analysis->openapi->components->schemas[0]; $this->assertEquals('NestedProperty', $schema->schema); $this->assertCount(1, $schema->properties); $parentProperty = $schema->properties[0]; $this->assertEquals('parentProperty', $parentProperty->property); $this->assertCount(1, $parentProperty->properties); $babyProperty = $parentProperty->properties[0]; $this->assertEquals('babyProperty', $babyProperty->property); $this->assertCount(1, $babyProperty->properties); $theBabyOfBaby = $babyProperty->properties[0]; $this->assertEquals('theBabyOfBaby', $theBabyOfBaby->property); $this->assertCount(1, $theBabyOfBaby->properties); // verbose not-recommend notations $theBabyOfBabyBaby = $theBabyOfBaby->properties[0]; $this->assertEquals('theBabyOfBabyBaby', $theBabyOfBabyBaby->property); $this->assertSame(Generator::UNDEFINED, $theBabyOfBabyBaby->properties); } }