Skip to content

Commit

Permalink
Fixed bug, was not importing items from yaml component schema
Browse files Browse the repository at this point in the history
  • Loading branch information
cnizzardini committed May 8, 2020
1 parent b2cb8bd commit 4e9ccfc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Lib/Swagger.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ private function pathWithRequestBody(Path $path, ExpressiveRoute $route) : Path
private function buildFromDefaults() : void
{
$array = Yaml::parseFile($this->config->getYml());

if (!isset($array['paths'])) {
$array['paths'] = [];
}
Expand All @@ -359,7 +360,8 @@ private function buildFromDefaults() : void
$schema = (new Schema())
->setName($schemaName)
->setType($schemaVar['type'])
->setDescription($schemaVar['description'] ?? '');
->setDescription($schemaVar['description'] ?? '')
->setItems($schemaVar['items'] ?? []);

$schemaVar['properties'] = $schemaVar['properties'] ?? [];

Expand Down

0 comments on commit 4e9ccfc

Please sign in to comment.