enrichComponents example

$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', '');

        return [
            new Server(['url' => rtrim($url, '/') . self::API[$api]['url']]),
        ];
Home | Imprint | This part of the site doesn't use cookies.