Skip to content

Commit

Permalink
Sort schemas alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
mattamon committed Jun 4, 2024
1 parent 0384279 commit 0f36e6b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/OpenApi/Service/OpenApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ public function __construct(private array $openApiScanPaths = [])

public function getConfig(): OpenApi
{
return Generator::scan([...$this->openApiScanPaths]);
$config = Generator::scan([...$this->openApiScanPaths]);

if ($config) {
asort($config->components->schemas);
}

return $config;
}
}

0 comments on commit 0f36e6b

Please sign in to comment.