Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit 028282f

Browse files
committed
add support for non-object schema reference
cover case with test
1 parent 087b89f commit 028282f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/unit/AttributeResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function testResolveNonDbModel()
121121
{
122122
$schemaFile = Yii::getAlias("@specs/petstore_jsonapi.yaml");
123123
$openApi = Reader::readFromYamlFile($schemaFile, OpenApi::class, false);
124-
$schema = new ComponentSchema($openApi->components->schemas['PetStatistic']);
124+
$schema = new ComponentSchema($openApi->components->schemas['PetStatistic'], 'PetStatistic');
125125
$resolver = new AttributeResolver('PetStatistic', $schema, new JunctionSchemas([]));
126126
$model = $resolver->resolve();
127127
$fixture = require Yii::getAlias('@fixtures/non-db.php');

0 commit comments

Comments
 (0)