Skip to content

Commit f62ab14

Browse files
authored
Merge pull request #842 from dunglas/rename_docs
Rename /doc to /docs
2 parents 97fda1b + 23d9b85 commit f62ab14

File tree

8 files changed

+25
-26
lines changed

8 files changed

+25
-26
lines changed

features/custom_identifier.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Feature: Using custom identifier on resource
8888
"""
8989

9090
Scenario: API doc is correctly generated
91-
When I send a "GET" request to "/doc.jsonld"
91+
When I send a "GET" request to "/docs.jsonld"
9292
Then the response status code should be 200
9393
And the response should be in JSON
9494
And the hydra class "CustomIdentifierDummy" exist

features/custom_normalized.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Feature: Using custom normalized entity
8989
"""
9090

9191
Scenario: API doc is correctly generated
92-
When I send a "GET" request to "/doc.jsonld"
92+
When I send a "GET" request to "/docs.jsonld"
9393
Then the response status code should be 200
9494
And the response should be in JSON
9595
And the hydra class "CustomNormalizedDummy" exist

features/custom_writable_identifier.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ Feature: Using custom writable identifier on resource
8989
}
9090
"""
9191

92-
Scenario: API doc is correctly generated
93-
When I send a "GET" request to "/doc.jsonld"
92+
Scenario: API docs are correctly generated
93+
When I send a "GET" request to "/docs.jsonld"
9494
Then the response status code should be 200
9595
And the response should be in JSON
9696
And the hydra class "CustomWritableIdentifierDummy" exist

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ 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/doc.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"'
8+
Then the header "Link" should be equal to '<http://example.com/docs.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"'
99

1010
Scenario: Retrieve the API vocabulary
11-
Given I send a "GET" request to "/doc.jsonld"
11+
Given I send a "GET" request to "/docs.jsonld"
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; charset=utf-8"
1515
# Context
16-
And the JSON node "@context.@vocab" should be equal to "http://example.com/doc.jsonld#"
16+
And the JSON node "@context.@vocab" should be equal to "http://example.com/docs.jsonld#"
1717
And the JSON node "@context.hydra" should be equal to "http://www.w3.org/ns/hydra/core#"
1818
And the JSON node "@context.rdf" should be equal to "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1919
And the JSON node "@context.rdfs" should be equal to "http://www.w3.org/2000/01/rdf-schema#"
@@ -30,7 +30,7 @@ Feature: Documentation support
3030
And the JSON node "@context.returns.@id" should be equal to "hydra:returns"
3131
And the JSON node "@context.returns.@type" should be equal to "@id"
3232
# Root properties
33-
And the JSON node "@id" should be equal to "/doc.jsonld"
33+
And the JSON node "@id" should be equal to "/docs.jsonld"
3434
And the JSON node "hydra:title" should be equal to "My Dummy API"
3535
And the JSON node "hydra:description" should be equal to "This is a test API."
3636
And the JSON node "hydra:entrypoint" should be equal to "/"

features/jsonld/context.feature

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Feature: JSON-LD contexts generation
88
Then the response status code should be 200
99
And the response should be in JSON
1010
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
11-
And the JSON node "@context.@vocab" should be equal to "http://example.com/doc.jsonld#"
11+
And the JSON node "@context.@vocab" should be equal to "http://example.com/docs.jsonld#"
1212
And the JSON node "@context.hydra" should be equal to "http://www.w3.org/ns/hydra/core#"
1313
And the JSON node "@context.dummy.@id" should be equal to "Entrypoint/dummy"
1414
And the JSON node "@context.dummy.@type" should be equal to "@id"
@@ -22,7 +22,7 @@ Feature: JSON-LD contexts generation
2222
"""
2323
{
2424
"@context": {
25-
"@vocab": "http://example.com/doc.jsonld#",
25+
"@vocab": "http://example.com/docs.jsonld#",
2626
"hydra": "http://www.w3.org/ns/hydra/core#",
2727
"description": "https://schema.org/description",
2828
"dummy": "#Dummy/dummy",
@@ -55,14 +55,14 @@ Feature: JSON-LD contexts generation
5555
And the JSON should be equal to:
5656
"""
5757
{
58-
"@context": {
59-
"@vocab": "http://example.com/doc.jsonld#",
60-
"hydra": "http://www.w3.org/ns/hydra/core#",
61-
"paris": "#RelationEmbedder/paris",
62-
"krondstadt": "#RelationEmbedder/krondstadt",
63-
"anotherRelated": "#RelationEmbedder/anotherRelated",
64-
"related": "#RelationEmbedder/related"
65-
}
58+
"@context": {
59+
"@vocab": "http://example.com/docs.jsonld#",
60+
"hydra": "http://www.w3.org/ns/hydra/core#",
61+
"paris": "#RelationEmbedder/paris",
62+
"krondstadt": "#RelationEmbedder/krondstadt",
63+
"anotherRelated": "#RelationEmbedder/anotherRelated",
64+
"related": "#RelationEmbedder/related"
65+
}
6666
}
6767
"""
6868

@@ -75,10 +75,10 @@ Feature: JSON-LD contexts generation
7575
"""
7676
{
7777
"@context": {
78-
"@vocab": "http:\/\/example.com\/doc.jsonld#",
79-
"hydra": "http:\/\/www.w3.org\/ns\/hydra\/core#",
78+
"@vocab": "http://example.com/docs.jsonld#",
79+
"hydra": "http://www.w3.org/ns/hydra/core#",
8080
"person": {
81-
"@id": "http:\/\/example.com\/id",
81+
"@id": "http://example.com/id",
8282
"@type": "@id",
8383
"foo": "bar"
8484
}

features/swagger/doc.feature renamed to features/swagger/docs.feature

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

66
@createSchema
77
Scenario: Retrieve the Swagger/OpenAPI documentation
8-
Given I send a "GET" request to "/doc.json"
8+
Given I send a "GET" request to "/docs.json"
99
Then the response status code should be 200
1010
And the response should be in JSON
1111
And the header "Content-Type" should be equal to "application/json; charset=utf-8"
@@ -60,9 +60,9 @@ Feature: Documentation support
6060
And the JSON node "paths./dummies.get.parameters[0].required" should be false
6161
And the JSON node "paths./dummies.get.parameters[0].type" should be equal to "integer"
6262

63-
Scenario: Swagger UI is enabled for the doc endpoint
63+
Scenario: Swagger UI is enabled for docs endpoint
6464
Given I add "Accept" header equal to "text/html"
65-
And I send a "GET" request to "/doc"
65+
And I send a "GET" request to "/docs"
6666
Then the response status code should be 200
6767
And I should see text matching "My Dummy API"
6868

src/Bridge/Symfony/Bundle/Resources/config/routing/api.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<requirement key="index">index</requirement>
1414
</route>
1515

16-
<route id="api_doc" path="/doc.{_format}">
16+
<route id="api_doc" path="/docs.{_format}">
1717
<default key="_controller">api_platform.action.documentation</default>
1818
<default key="_api_respond">1</default>
1919
<default key="_format" />

src/Bridge/Symfony/Bundle/Resources/config/routing/jsonld.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313
<requirement key="shortName">.+</requirement>
1414
</route>
1515

16-
1716
</routes>

0 commit comments

Comments
 (0)