for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace ApiPlatform\Core\OpenApi;
class OpenApi
{
public const VERSION = '3.0.2';
private $openapi;
private $info;
private $servers;
private $paths;
private $components;
private $security;
private $tags;
private $externalDocs;
public function __construct(Info $info, array $servers = [], Paths $paths, Components $components = null, array $security = [], array $tags = [], $externalDocs = null)
$this->openapi = self::VERSION;
$this->info = $info;
$this->servers = $servers;
$this->paths = $paths;
$this->components = $components;
$this->security = $security;
$this->tags = $tags;
$this->externalDocs = $externalDocs;
}
public function getOpenapi(): string
return $this->openapi;
public function getInfo(): Info
return $this->info;
public function getServers(): array
return $this->servers;
public function getPaths(): Paths
return $this->paths;
public function getComponents(): Components
return $this->components;
return $this->components
null
ApiPlatform\Core\OpenApi\Components
public function getSecurity(): array
return $this->security;
public function getTags(): array
return $this->tags;
public function getExternalDocs(): array
return $this->externalDocs;