Skip to content

Commit 14b754a

Browse files
authored
test(jsonld): type inconsistency when using itemUriTemplate (#7650)
1 parent 38e09ec commit 14b754a

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
* [21aa2572d](https://github.com/api-platform/core/commit/21aa2572d8fef2b3f05f7307c51348a6c9767e45) feat(elasticsearch): add SSL options for Elasticsearch configuration (#4059)
88
* [ba0c76c](https://github.com/api-platform/core/commit/ba0c76c6f5c8afa8622e87a155b8b99f453d6453) feat(doctrine): remove put & path for readonly entity (#7019)
99

10+
### Breaking changes
11+
12+
* When using `output` with `itemUriTemplate` on a collection operation, the JSON-LD `@type` will now use the resource class name instead of the output DTO class name for semantic consistency with `itemUriTemplate` behavior.
13+
1014
## v4.2.11
1115

1216
### Bug fixes

features/jsonld/input_output.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ Feature: JSON-LD DTO input and output
379379
Then the response status code should be 200
380380
And the response should be in JSON
381381
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
382+
Then print last JSON response
382383
And the JSON should be valid according to this schema:
383384
"""
384385
{
@@ -400,7 +401,7 @@ Feature: JSON-LD DTO input and output
400401
"required": ["@id", "@type", "foo", "bar"],
401402
"properties": {
402403
"@id": {"pattern": "/dummy_foos/bar"},
403-
"@type": {"pattern": "^DummyCollectionDtoOutput$"},
404+
"@type": {"pattern": "^DummyFooCollectionDto$"},
404405
"foo": {"type": "string"},
405406
"bar": {"type": "integer"}
406407
}

0 commit comments

Comments
 (0)