File tree Expand file tree Collapse file tree 5 files changed +21
-14
lines changed
features/fixtures/TestApp Expand file tree Collapse file tree 5 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 13
13
14
14
use Dunglas \JsonLdApiBundle \Response \JsonLdResponse ;
15
15
use Symfony \Bundle \FrameworkBundle \Controller \Controller ;
16
- use Symfony \Component \HttpFoundation \Response ;
17
- use Symfony \Component \Routing \Annotation \Route ;
18
16
19
17
/**
20
18
* Generates API documentation.
@@ -27,8 +25,6 @@ class DocumentationController extends Controller
27
25
* Serves the entrypoint of the API.
28
26
*
29
27
* @return JsonLdResponse
30
- *
31
- * @Route(name="json_ld_api_entrypoint", path="/")
32
28
*/
33
29
public function entrypointAction ()
34
30
{
@@ -38,9 +34,7 @@ public function entrypointAction()
38
34
/**
39
35
* Namespace of types specific to the current API.
40
36
*
41
- * @return Response
42
- *
43
- * @Route(name="json_ld_api_vocab", path="/vocab")
37
+ * @return JsonLdResponse
44
38
*/
45
39
public function vocabAction ()
46
40
{
@@ -53,8 +47,6 @@ public function vocabAction()
53
47
* @param string $shortName
54
48
*
55
49
* @return JsonLdResponse
56
- *
57
- * @Route(name="json_ld_api_context", path="/contexts/{shortName}")
58
50
*/
59
51
public function contextAction ($ shortName )
60
52
{
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+
3
+ <routes xmlns =" http://symfony.com/schema/routing"
4
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
+ xsi : schemaLocation =" http://symfony.com/schema/routing
6
+ http://symfony.com/schema/routing/routing-1.0.xsd" >
7
+
8
+ <route id =" json_ld_api_entrypoint" path =" /" >
9
+ <default key =" _controller" >DunglasJsonLdApiBundle:Documentation:entrypoint</default >
10
+ </route >
11
+
12
+ <route id =" json_ld_api_vocab" path =" /vocab" >
13
+ <default key =" _controller" >DunglasJsonLdApiBundle:Documentation:vocab</default >
14
+ </route >
15
+
16
+ <route id =" json_ld_api_context" path =" /contexts/{shortName}" >
17
+ <default key =" _controller" >DunglasJsonLdApiBundle:Documentation:context</default >
18
+ </route >
19
+ </routes >
Original file line number Diff line number Diff line change 25
25
"phpdocumentor/reflection-docblock" : " ~2.0"
26
26
},
27
27
"require-dev" : {
28
- "sensio/framework-extra-bundle" : " ~3.0" ,
29
28
"phpspec/phpspec" : " ~2.0" ,
30
29
"behat/behat" : " ~3.0" ,
31
30
"behat/symfony2-extension" : " ~2.0" ,
35
34
"behatch/contexts" : " ~2.2"
36
35
},
37
36
"suggest" : {
38
- "sensio/framework-extra-bundle" : " Automatically load documentation routes." ,
39
37
"friendsofsymfony/user-bundle" : " To use the FOSUserBundle bridge."
40
38
},
41
39
"autoload" : {
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ public function registerBundles()
32
32
return [
33
33
new FrameworkBundle (),
34
34
new DoctrineBundle (),
35
- new SensioFrameworkExtraBundle (),
36
35
new DunglasJsonLdApiBundle (),
37
36
new TestBundle (),
38
37
];
Original file line number Diff line number Diff line change 1
1
api_doc :
2
- resource : " @DunglasJsonLdApiBundle/Controller/"
3
- type : " annotation"
2
+ resource : " @DunglasJsonLdApiBundle/Resources/config/routing.xml"
4
3
5
4
api :
6
5
resource : " ."
You can’t perform that action at this time.
0 commit comments