45 lines
1.3 KiB
PHP
Raw Normal View History

2016-07-12 00:33:55 +02:00
<?php
/*
2016-12-29 12:09:26 +01:00
* This file is part of the NelmioApiDocBundle package.
2016-07-12 00:33:55 +02:00
*
2016-12-29 12:09:26 +01:00
* (c) Nelmio
2016-07-12 00:33:55 +02:00
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2016-12-29 12:09:26 +01:00
namespace Nelmio\ApiDocBundle\DependencyInjection;
2016-07-12 00:33:55 +02:00
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
2016-11-30 15:04:53 +01:00
final class Configuration implements ConfigurationInterface
2016-07-12 00:33:55 +02:00
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$treeBuilder
2016-12-29 12:09:26 +01:00
->root('nelmio_api_doc')
->children()
->arrayNode('documentation')
->info('The documentation used as base')
->example(['info' => ['title' => 'My App']])
->prototype('variable')->end()
->end()
->arrayNode('routes')
->info('Filter the routes that are documented')
->addDefaultsIfNotSet()
->children()
->arrayNode('path_patterns')
2016-12-01 17:25:53 +01:00
->example(['^/api', '^/api(?!/admin)'])
->prototype('scalar')->end()
->end()
->end()
->end()
->end();
2016-07-12 00:33:55 +02:00
return $treeBuilder;
}
}