Skip to content

Commit 52973cb

Browse files
committed
Rename /vocab to /apidoc
1 parent b811e4c commit 52973cb

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

Controller/HydraController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class HydraController extends Controller
2626
*
2727
* @return Response
2828
*/
29-
public function vocabAction()
29+
public function docAction()
3030
{
3131
return new Response($this->get('api.hydra.documentation_builder')->getApiDocumentation());
3232
}

Resources/config/routing/hydra.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xsi:schemaLocation="http://symfony.com/schema/routing
66
http://symfony.com/schema/routing/routing-1.0.xsd">
77

8-
<route id="api_hydra_vocab" path="/vocab">
9-
<default key="_controller">DunglasApiBundle:Hydra:vocab</default>
8+
<route id="api_hydra_vocab" path="/apidoc">
9+
<default key="_controller">DunglasApiBundle:Hydra:doc</default>
1010
</route>
1111
</routes>

features/bootstrap/HydraContext.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function assertTheHydraClassExist($className)
2727
}
2828

2929
/**
30-
* @Then :nb operations are availables for hydra class ":class"
30+
* @Then :nb operations are available for hydra class ":class"
3131
*/
3232
public function assertNbOperationsExist($nb, $className)
3333
{
@@ -40,7 +40,7 @@ public function assertNbOperationsExist($nb, $className)
4040
}
4141

4242
/**
43-
* @Then :nb properties are availables for hydra class ":class"
43+
* @Then :nb properties are available for hydra class ":class"
4444
*/
4545
public function assertNbPropertiesExist($nb, $className)
4646
{

features/custom_identifier.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ Feature: Using custom identifier on resource
8484
}
8585
"""
8686

87-
Scenario: Vocab is correctly generated
88-
When I send a "GET" request to "/vocab"
87+
Scenario: API doc is correctly generated
88+
When I send a "GET" request to "/apidoc"
8989
Then the response status code should be 200
9090
And the response should be in JSON
9191
And the hydra class "CustomIdentifierDummy" exist
92-
And 3 operations are availables for hydra class "CustomIdentifierDummy"
93-
And 1 properties are availables for hydra class "CustomIdentifierDummy"
92+
And 3 operations are available for hydra class "CustomIdentifierDummy"
93+
And 1 properties are available for hydra class "CustomIdentifierDummy"
9494
And "name" property is readable for hydra class "CustomIdentifierDummy"
9595
And "name" property is writable for hydra class "CustomIdentifierDummy"
9696

features/custom_normalized.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ Feature: Using custom normalized entity
8989
}
9090
"""
9191

92-
Scenario: Vocab is correctly generated
93-
When I send a "GET" request to "/vocab"
92+
Scenario: API doc is correctly generated
93+
When I send a "GET" request to "/apidoc"
9494
Then the response status code should be 200
9595
And the response should be in JSON
9696
And the hydra class "CustomNormalizedDummy" exist
97-
And 3 operations are availables for hydra class "CustomNormalizedDummy"
98-
And 2 properties are availables for hydra class "CustomNormalizedDummy"
97+
And 3 operations are available for hydra class "CustomNormalizedDummy"
98+
And 2 properties are available for hydra class "CustomNormalizedDummy"
9999
And "name" property is readable for hydra class "CustomNormalizedDummy"
100100
And "name" property is writable for hydra class "CustomNormalizedDummy"
101101
And "alias" property is readable for hydra class "CustomNormalizedDummy"

features/custom_writable_identifier.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ Feature: Using custom writable identifier on resource
8686
}
8787
"""
8888

89-
Scenario: Vocab is correctly generated
90-
When I send a "GET" request to "/vocab"
89+
Scenario: API doc is correctly generated
90+
When I send a "GET" request to "/apidoc"
9191
Then the response status code should be 200
9292
And the response should be in JSON
9393
And the hydra class "CustomWritableIdentifierDummy" exist
94-
And 3 operations are availables for hydra class "CustomWritableIdentifierDummy"
95-
And 2 properties are availables for hydra class "CustomWritableIdentifierDummy"
94+
And 3 operations are available for hydra class "CustomWritableIdentifierDummy"
95+
And 2 properties are available for hydra class "CustomWritableIdentifierDummy"
9696
And "name" property is readable for hydra class "CustomWritableIdentifierDummy"
9797
And "name" property is writable for hydra class "CustomWritableIdentifierDummy"
9898
And "slug" property is not readable for hydra class "CustomWritableIdentifierDummy"

features/hydra/vocab.feature renamed to features/hydra/doc.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ Feature: Documentation support
55

66
Scenario: Checks that the Link pointing to the Hydra documentation is set
77
Given I send a "GET" request to "/"
8-
Then the header "Link" should be equal to '<http://example.com/vocab>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"'
8+
Then the header "Link" should be equal to '<http://example.com/apidoc>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"'
99

1010
Scenario: Retrieve the API vocabulary
11-
Given I send a "GET" request to "/vocab"
11+
Given I send a "GET" request to "/apidoc"
1212
Then the response status code should be 200
1313
And the response should be in JSON
1414
And the header "Content-Type" should be equal to "application/ld+json"
1515
And the JSON should be equal to:
1616
"""
1717
{
1818
"@context": {
19-
"@vocab": "http:\/\/example.com\/vocab#",
19+
"@vocab": "http:\/\/example.com\/apidoc#",
2020
"hydra": "http:\/\/www.w3.org\/ns\/hydra\/core#",
2121
"rdf": "http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#",
2222
"rdfs": "http:\/\/www.w3.org\/2000\/01\/rdf-schema#",
@@ -43,7 +43,7 @@ Feature: Documentation support
4343
"@type": "@id"
4444
}
4545
},
46-
"@id": "\/vocab",
46+
"@id": "\/apidoc",
4747
"hydra:title": "My Dummy API",
4848
"hydra:description": "This is a test API.",
4949
"hydra:entrypoint": "\/",

features/json-ld/context.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Feature: JSON-LD contexts generation
1212
"""
1313
{
1414
"@context": {
15-
"@vocab": "http://example.com/vocab#",
15+
"@vocab": "http://example.com/apidoc#",
1616
"hydra": "http://www.w3.org/ns/hydra/core#",
1717
"name": "http://schema.org/name",
1818
"alias": "https://schema.org/alternateName",
@@ -42,7 +42,7 @@ Feature: JSON-LD contexts generation
4242
"""
4343
{
4444
"@context": {
45-
"@vocab": "http://example.com/vocab#",
45+
"@vocab": "http://example.com/apidoc#",
4646
"hydra": "http://www.w3.org/ns/hydra/core#",
4747
"name": "http://schema.org/name",
4848
"alias": "https://schema.org/alternateName",
@@ -72,7 +72,7 @@ Feature: JSON-LD contexts generation
7272
"""
7373
{
7474
"@context": {
75-
"@vocab": "http://example.com/vocab#",
75+
"@vocab": "http://example.com/apidoc#",
7676
"hydra": "http://www.w3.org/ns/hydra/core#",
7777
"related": "#RelationEmbedder/related",
7878
"paris": "#RelationEmbedder/paris",

0 commit comments

Comments
 (0)