public function enrich(OpenApi
$openApi, string
$api): void
{ $openApi->
merge($this->
createServers($api));
$openApi->info =
$this->
createInfo($api,
$this->version
);
/** @var array|string $security */
$security =
$openApi->security;
$openApi->security =
[array_merge(\
is_array($security) ?
$security :
[],
$this->
createSecurity($api))];
if (!
$openApi->components instanceof Components
) { $openApi->components =
new Components([]);
} $this->
enrichComponents($openApi->components,
$api);
} /**
* @return Server[]
*/
private function createServers(string
$api): array
{ $url =
(string) EnvironmentHelper::
getVariable('APP_URL', ''
);