mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
#25 Added section property to the ApiDoc class
This commit is contained in:
parent
c946fbcf4f
commit
b7aa5dca72
@ -56,6 +56,13 @@ class ApiDoc
|
|||||||
*/
|
*/
|
||||||
private $description = null;
|
private $description = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Section to group actions together.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $section = 'none';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extended documentation.
|
* Extended documentation.
|
||||||
*
|
*
|
||||||
@ -128,6 +135,10 @@ class ApiDoc
|
|||||||
if (isset($data['statusCodes'])) {
|
if (isset($data['statusCodes'])) {
|
||||||
$this->statusCodes = $data['statusCodes'];
|
$this->statusCodes = $data['statusCodes'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($data['section'])) {
|
||||||
|
$this->section = $data['section'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -188,6 +199,22 @@ class ApiDoc
|
|||||||
$this->description = $description;
|
$this->description = $description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $section
|
||||||
|
*/
|
||||||
|
public function setSection($section)
|
||||||
|
{
|
||||||
|
$this->section = $section;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getSection()
|
||||||
|
{
|
||||||
|
return $this->section;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $documentation
|
* @param string $documentation
|
||||||
*/
|
*/
|
||||||
@ -303,6 +330,10 @@ class ApiDoc
|
|||||||
$data['statusCodes'] = $statusCodes;
|
$data['statusCodes'] = $statusCodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($section = $this->section) {
|
||||||
|
$data['section'] = $section;
|
||||||
|
}
|
||||||
|
|
||||||
$data['https'] = $this->https;
|
$data['https'] = $this->https;
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user