Skip to content

Commit

Permalink
Stop embedding jons-ld contexts in the API responses
Browse files Browse the repository at this point in the history
It's optional, and we no longer depend on it in the frontend
  • Loading branch information
lazka committed Oct 31, 2023
1 parent 045fd84 commit 3ab826a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 19 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

- JSON-LD contexts are no longer embedded in the API responses, they have to be fetched separately.

## 0.4.13

- fix: content URL loading for status changes when file is stored in database
Expand Down
3 changes: 1 addition & 2 deletions src/Entity/DeliveryStatusChange.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
* iri="https://schema.org/Status",
* shortName="DispatchDeliveryStatusChange",
* normalizationContext={
* "groups" = {"DispatchDeliveryStatusChange:output"},
* "jsonld_embed_context" = true
* "groups" = {"DispatchDeliveryStatusChange:output"}
* }
* )
*/
Expand Down
6 changes: 2 additions & 4 deletions src/Entity/PreAddressingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@
* iri="https://schema.org/Action",
* shortName="DispatchPreAddressingRequest",
* normalizationContext={
* "groups" = {"DispatchPreAddressingRequest:output"},
* "jsonld_embed_context" = true
* "groups" = {"DispatchPreAddressingRequest:output"}
* },
* denormalizationContext={
* "groups" = {"DispatchPreAddressingRequest:input"},
* "jsonld_embed_context" = true
* "groups" = {"DispatchPreAddressingRequest:input"}
* }
* )
*/
Expand Down
6 changes: 2 additions & 4 deletions src/Entity/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,10 @@
* iri="https://schema.org/Action",
* shortName="DispatchRequest",
* normalizationContext={
* "groups" = {"DispatchRequest:output"},
* "jsonld_embed_context" = true
* "groups" = {"DispatchRequest:output"}
* },
* denormalizationContext={
* "groups" = {"DispatchRequest:input"},
* "jsonld_embed_context" = true
* "groups" = {"DispatchRequest:input"}
* }
* )
*/
Expand Down
6 changes: 2 additions & 4 deletions src/Entity/RequestFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,10 @@
* iri="https://schema.org/DigitalDocument",
* shortName="DispatchRequestFile",
* normalizationContext={
* "groups" = {"DispatchRequestFile:output", "DispatchRequest:output"},
* "jsonld_embed_context" = true
* "groups" = {"DispatchRequestFile:output", "DispatchRequest:output"}
* },
* denormalizationContext={
* "groups" = {"DispatchRequestFile:input"},
* "jsonld_embed_context" = true
* "groups" = {"DispatchRequestFile:input"}
* }
* )
*/
Expand Down
6 changes: 2 additions & 4 deletions src/Entity/RequestRecipient.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,10 @@
* iri="https://schema.org/Person",
* shortName="DispatchRequestRecipient",
* normalizationContext={
* "groups" = {"DispatchRequestRecipient:output"},
* "jsonld_embed_context" = true
* "groups" = {"DispatchRequestRecipient:output"}
* },
* denormalizationContext={
* "groups" = {"DispatchRequestRecipient:input"},
* "jsonld_embed_context" = true
* "groups" = {"DispatchRequestRecipient:input"}
* }
* )
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/api_resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resources:
shortName: 'DispatchGroup'
normalizationContext:
groups: ['DispatchGroup:output']
jsonld_embed_context: true

operations:
ApiPlatform\Metadata\Get:
provider: Dbp\Relay\DispatchBundle\DataProvider\GroupDataProvider
Expand Down

0 comments on commit 3ab826a

Please sign in to comment.