From 7f8a4d4b595f9e148cc9e8d71cc6278d856c3fe5 Mon Sep 17 00:00:00 2001 From: Dominik Liebler Date: Sat, 21 Sep 2013 23:31:14 +0200 Subject: [PATCH 1/2] added XML namespace and XSD --- DependencyInjection/NelmioApiDocExtension.php | 16 ++++ Resources/config/schema/api_doc.xsd | 85 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 Resources/config/schema/api_doc.xsd diff --git a/DependencyInjection/NelmioApiDocExtension.php b/DependencyInjection/NelmioApiDocExtension.php index d26a39d..9decfec 100644 --- a/DependencyInjection/NelmioApiDocExtension.php +++ b/DependencyInjection/NelmioApiDocExtension.php @@ -50,4 +50,20 @@ class NelmioApiDocExtension extends Extension $container->setParameter('nelmio_api_doc.sandbox.authentication', $config['sandbox']['authentication']); } } + + /** + * @return string + */ + public function getNamespace() + { + return 'http://nelmio.github.io/schema/dic/nelmio_api_doc'; + } + + /** + * @return string + */ + public function getXsdValidationBasePath() + { + return __DIR__ . '/../Resources/config/schema'; + } } diff --git a/Resources/config/schema/api_doc.xsd b/Resources/config/schema/api_doc.xsd new file mode 100644 index 0000000..66f36a9 --- /dev/null +++ b/Resources/config/schema/api_doc.xsd @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 7ba7ea40368a182fc2363bc59b54263f227eeaa6 Mon Sep 17 00:00:00 2001 From: Dominik Liebler Date: Mon, 23 Sep 2013 13:46:32 +0200 Subject: [PATCH 2/2] changed XSD elements to attributes --- Resources/config/schema/api_doc.xsd | 44 +++++++++++------------------ 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/Resources/config/schema/api_doc.xsd b/Resources/config/schema/api_doc.xsd index 66f36a9..b8c97ab 100644 --- a/Resources/config/schema/api_doc.xsd +++ b/Resources/config/schema/api_doc.xsd @@ -6,37 +6,31 @@ - - + - + + - - - + - - - - + + - - - - - - - - + + + + + + @@ -47,10 +41,8 @@ - - - - + + @@ -68,11 +60,9 @@ - - - - - + + +