Skip to content

Commit 7408b76

Browse files
fix(#3833): fix api_jsonld_context route declaration
1 parent de239e5 commit 7408b76

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

features/jsonld/iri_only.feature

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Feature: JSON-LD using iri_only parameter
33
As a Vulcain user and as a developer
44
I should be able to only get an IRI list when I ask a resource.
55

6-
Scenario: Retrieve Dummy's resource context with iri_only
7-
When I send a "GET" request to "/contexts/IriOnlyDummy"
6+
Scenario Outline: Retrieve Dummy's resource context with iri_only
7+
When I send a "GET" request to "<uri>"
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"
@@ -20,6 +20,14 @@ Feature: JSON-LD using iri_only parameter
2020
}
2121
}
2222
"""
23+
Examples:
24+
| uri |
25+
| /contexts/IriOnlyDummy |
26+
| /contexts/IriOnlyDummy.jsonld |
27+
28+
Scenario: Retrieve Dummy's resource context with invalid format returns an error
29+
When I send a "GET" request to "/contexts/IriOnlyDummy.json"
30+
Then the response status code should be 404
2331

2432
@createSchema
2533
Scenario: Retrieve Dummies with iri_only and jsonld_embed_context

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
<default key="_format">jsonld</default>
1111
<default key="_api_respond">true</default>
1212

13-
<requirement key="shortName">.+</requirement>
13+
<requirement key="shortName">[^.]+</requirement>
14+
<requirement key="_format">jsonld</requirement>
1415
</route>
1516

1617
</routes>

0 commit comments

Comments
 (0)