Skip to content

Commit 79eeca7

Browse files
authored
Give attributes individual contexts (#1754)
1 parent df55555 commit 79eeca7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Analysers/AttributeAnnotationFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public function build(\Reflector $reflector, Context $context): array
5959
foreach ($rp->getAttributes($attributeName, \ReflectionAttribute::IS_INSTANCEOF) as $attribute) {
6060
/** @var OA\Property|OA\Parameter|OA\RequestBody $instance */
6161
$instance = $attribute->newInstance();
62+
$instance->_context = new Context(['nested' => true], $context);
6263

6364
$type = (($rnt = $rp->getType()) && $rnt instanceof \ReflectionNamedType) ? $rnt->getName() : Generator::UNDEFINED;
6465
$nullable = $rnt ? $rnt->allowsNull() : true;

0 commit comments

Comments
 (0)