|
8 | 8 |
|
9 | 9 | use OpenApi\Analysis;
|
10 | 10 | use OpenApi\Annotations as OA;
|
11 |
| -use OpenApi\Annotations\Components; |
12 | 11 | use OpenApi\Context;
|
13 | 12 | use OpenApi\Generator;
|
14 | 13 |
|
@@ -82,15 +81,15 @@ protected function augmentType(Analysis $analysis, OA\Property $property, Contex
|
82 | 81 | if (!$this->mapNativeType($property, $type)) {
|
83 | 82 | $schema = $analysis->getSchemaForSource($context->fullyQualifiedName($type));
|
84 | 83 | if (Generator::isDefault($property->ref) && $schema) {
|
85 |
| - $property->ref = Components::ref($schema); |
| 84 | + $property->ref = OA\Components::ref($schema); |
86 | 85 | }
|
87 | 86 | }
|
88 | 87 |
|
89 | 88 | // ok, so we possibly have a type or ref
|
90 | 89 | if (!Generator::isDefault($property->ref) && $typeMatches[2] === '' && !Generator::isDefault($property->nullable) && $property->nullable) {
|
91 | 90 | $schema = $analysis->getSchemaForSource($context->fullyQualifiedName($type));
|
92 | 91 | if ($schema) {
|
93 |
| - $property->ref = Components::ref($schema); |
| 92 | + $property->ref = OA\Components::ref($schema); |
94 | 93 | }
|
95 | 94 | } elseif ($typeMatches[2] === '[]') {
|
96 | 95 | if (Generator::isDefault($property->items)) {
|
@@ -147,11 +146,11 @@ protected function augmentType(Analysis $analysis, OA\Property $property, Contex
|
147 | 146 | if (!$this->mapNativeType($property, $type)) {
|
148 | 147 | $schema = $analysis->getSchemaForSource($context->fullyQualifiedName($type));
|
149 | 148 | if (Generator::isDefault($property->ref) && $schema) {
|
150 |
| - $this->applyRef($analysis, $property, Components::ref($schema)); |
| 149 | + $this->applyRef($analysis, $property, OA\Components::ref($schema)); |
151 | 150 | } else {
|
152 | 151 | if (is_string($context->type) && $typeSchema = $analysis->getSchemaForSource($context->type)) {
|
153 | 152 | if (Generator::isDefault($property->format)) {
|
154 |
| - $property->ref = Components::ref($typeSchema); |
| 153 | + $property->ref = OA\Components::ref($typeSchema); |
155 | 154 | $property->type = Generator::UNDEFINED;
|
156 | 155 | }
|
157 | 156 | }
|
|
0 commit comments