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 PathItem
{
private $ref;
private $summary;
private $description;
private $get;
private $put;
private $post;
private $delete;
private $options;
private $head;
private $patch;
private $trace;
private $servers;
private $parameters;
public function __construct(?string $ref = null, string $summary = '', string $description = '', Operation $get = null, Operation $put = null, Operation $post = null, Operation $delete = null, Operation $options = null, Operation $head = null, Operation $patch = null, Operation $trace = null, array $servers = [], array $parameters = [])
$this->ref = $ref;
$this->summary = $summary;
$this->description = $description;
$this->get = $get;
$this->put = $put;
$this->post = $post;
$this->delete = $delete;
$this->options = $options;
$this->head = $head;
$this->patch = $patch;
$this->trace = $trace;
$this->servers = $servers;
$this->parameters = $parameters;
}
public function addOperation(string $method, Operation $operation)
$this->{strtolower($method)} = $operation;