mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
'type' becomes 'dataType' for consistency purpose
This commit is contained in:
parent
84c82f3b94
commit
2f62db82a9
@ -285,7 +285,7 @@ class ApiDocExtractor
|
|||||||
if ('_method' !== $name) {
|
if ('_method' !== $name) {
|
||||||
$requirements[$name] = array(
|
$requirements[$name] = array(
|
||||||
'requirement' => $value,
|
'requirement' => $value,
|
||||||
'type' => '',
|
'dataType' => '',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -303,7 +303,7 @@ class ApiDocExtractor
|
|||||||
$found = false;
|
$found = false;
|
||||||
foreach ($paramDocs as $paramDoc) {
|
foreach ($paramDocs as $paramDoc) {
|
||||||
if (preg_match(sprintf($regexp, preg_quote($var)), $paramDoc, $matches)) {
|
if (preg_match(sprintf($regexp, preg_quote($var)), $paramDoc, $matches)) {
|
||||||
$requirements[$var]['type'] = isset($matches[1]) ? $matches[1] : '';
|
$requirements[$var]['dataType'] = isset($matches[1]) ? $matches[1] : '';
|
||||||
$requirements[$var]['description'] = $matches[2];
|
$requirements[$var]['description'] = $matches[2];
|
||||||
|
|
||||||
if (!isset($requirements[$var]['requirement'])) {
|
if (!isset($requirements[$var]['requirement'])) {
|
||||||
@ -316,7 +316,7 @@ class ApiDocExtractor
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($requirements[$var]) && false === $found) {
|
if (!isset($requirements[$var]) && false === $found) {
|
||||||
$requirements[$var] = array('requirement' => '', 'type' => '', 'description' => '');
|
$requirements[$var] = array('requirement' => '', 'dataType' => '', 'description' => '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,7 +344,7 @@ class ApiDocExtractor
|
|||||||
if ($annot->strict) {
|
if ($annot->strict) {
|
||||||
$annotation->addRequirement($annot->name, array(
|
$annotation->addRequirement($annot->name, array(
|
||||||
'requirement' => $annot->requirements,
|
'requirement' => $annot->requirements,
|
||||||
'type' => '',
|
'dataType' => '',
|
||||||
'description' => $annot->description,
|
'description' => $annot->description,
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{ name }}</td>
|
<td>{{ name }}</td>
|
||||||
<td>{{ infos.requirement }}</td>
|
<td>{{ infos.requirement }}</td>
|
||||||
<td>{{ infos.type }}</td>
|
<td>{{ infos.dataType }}</td>
|
||||||
<td>{{ infos.description }}</td>
|
<td>{{ infos.description }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user