diff --git a/Extractor/AnnotationsProvider/DunglasApiProvider.php b/Extractor/AnnotationsProvider/DunglasApiProvider.php index b317c5d..c80bd4e 100644 --- a/Extractor/AnnotationsProvider/DunglasApiProvider.php +++ b/Extractor/AnnotationsProvider/DunglasApiProvider.php @@ -114,6 +114,7 @@ class DunglasApiProvider implements AnnotationsProviderInterface 'resource' => $route->getPath(), 'description' => $operationHydraDoc['hydra:title'], 'resourceDescription' => $resourceHydraDoc['hydra:title'], + 'section' => $resourceHydraDoc['hydra:title'], ]; $entityClass = $resource->getEntityClass(); diff --git a/Tests/Formatter/MarkdownFormatterTest.php b/Tests/Formatter/MarkdownFormatterTest.php index f441c65..28f456e 100644 --- a/Tests/Formatter/MarkdownFormatterTest.php +++ b/Tests/Formatter/MarkdownFormatterTest.php @@ -27,6 +27,90 @@ class MarkdownFormatterTest extends WebTestCase if (class_exists('Dunglas\ApiBundle\DunglasApiBundle')) { $expected = << false, 'resourceDescription' => 'Popo', + 'section' => 'Popo', ), 8 => array ( @@ -1668,6 +1669,7 @@ And, it supports multilines until the first \'@\' char.', ), 'deprecated' => false, 'resourceDescription' => 'Popo', + 'section' => 'Popo', ), 9 => array ( @@ -1701,6 +1703,7 @@ And, it supports multilines until the first \'@\' char.', ), 'deprecated' => false, 'resourceDescription' => 'Popo', + 'section' => 'Popo', ), 10 => array ( @@ -1744,6 +1747,7 @@ And, it supports multilines until the first \'@\' char.', ), 'deprecated' => false, 'resourceDescription' => 'Popo', + 'section' => 'Popo', ), 11 => array ( @@ -1767,6 +1771,7 @@ And, it supports multilines until the first \'@\' char.', ), 'deprecated' => false, 'resourceDescription' => 'Popo', + 'section' => 'Popo', ), 12 => array (