From: Nicolas LÅ“uillet Date: Wed, 28 Jan 2015 17:14:04 +0000 (+0100) Subject: bundle for API X-Git-Tag: 2.0.0-alpha.0~127 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=3e5a342f6552fc921b9b7fd3d65d9200cdc1979c;p=github%2Fwallabag%2Fwallabag.git bundle for API --- diff --git a/app/AppKernel.php b/app/AppKernel.php index e2db75a7..e8160135 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -2,6 +2,7 @@ use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; +use Wallabag\ApiBundle\WallabagApiBundle; class AppKernel extends Kernel { @@ -20,6 +21,7 @@ class AppKernel extends Kernel new JMS\SerializerBundle\JMSSerializerBundle(), new Nelmio\ApiDocBundle\NelmioApiDocBundle(), new Wallabag\CoreBundle\WallabagCoreBundle(), + new Wallabag\ApiBundle\WallabagApiBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { diff --git a/app/config/routing.yml b/app/config/routing.yml index a57311dc..60fcb6f4 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -10,7 +10,7 @@ doc-api: resource: "@NelmioApiDocBundle/Resources/config/routing.yml" prefix: /api/doc -rest : - type : rest - resource : "routing_rest.yml" - prefix : /api \ No newline at end of file +wallabag_api: + resource: "@WallabagApiBundle/Controller/" + type: annotation + prefix: /api \ No newline at end of file diff --git a/app/config/routing_rest.yml b/app/config/routing_rest.yml deleted file mode 100644 index ecddbd36..00000000 --- a/app/config/routing_rest.yml +++ /dev/null @@ -1,4 +0,0 @@ -app_api : - type: rest - resource: "WallabagCoreBundle:Api" - name_prefix: api_ \ No newline at end of file diff --git a/src/Wallabag/ApiBundle/Controller/EntryController.php b/src/Wallabag/ApiBundle/Controller/EntryController.php new file mode 100644 index 00000000..07ca8ccf --- /dev/null +++ b/src/Wallabag/ApiBundle/Controller/EntryController.php @@ -0,0 +1,29 @@ +