diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 721c962..c079a5e 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -28,23 +28,17 @@ class Configuration implements ConfigurationInterface ->children() ->scalarNode('enabled')->defaultTrue()->end() ->scalarNode('endpoint')->defaultValue('/app_dev.php')->end() - ->scalarNode('json_declaration_method') + ->enumNode('json_declaration_method') + ->values(array('format_param', 'accept_header')) ->defaultValue('format_param') - ->validate() - ->ifNotInArray(array('format_param', 'accept_header')) - ->thenInvalid("Unknown json declaration method '%s'.") - ->end() ->end() ->arrayNode('authentication') ->children() ->scalarNode('name')->isRequired()->end() - ->scalarNode('delivery') + ->enumNode('delivery') + // header|query|request, but only query is implemented for now + ->values(array('query')) ->isRequired() - ->validate() - // header|query|request, but only query is implemented for now - ->ifNotInArray(array('query')) - ->thenInvalid("Unknown authentication delivery type '%s'.") - ->end() ->end() ->end() ->end()