-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ApiPlatform): Disabled
metadata_backward_compatibility_layer
a…
…nd migrated all API resources, filters, extensions to new `Operation` syntax BREAKING CHANGE: You must migrate your `config/api_resources/*.yml` files to use new [ApiPlatform interfaces and resource YML syntax](https://api-platform.com/docs/core/upgrade-guide/#summary-of-the-changes-between-26-and-2730) - Remove and regenerate your NS entities with `bin/console generate:nsentities` to update namespaces - Remove and regenerate your Resource configs with `bin/console generate:api-resources` - If you do not want to remove existing config, [you'll have to move `itemOperations` and `collectionOperations` to single `operations` node](https://api-platform.com/docs/core/upgrade-guide/#metadata-changes) and add `class` with `ApiPlatform\Metadata\Get` or `ApiPlatform\Metadata\GetCollection` - Rename `iri` to `types` and wrap single values into array - Rename `path` to `uriTemplate` - Rename `normalization_context` to `normalizationContext` - Rename `openapi_context` to `openapiContext` - Move `shortName` to each `operation` - Rename `attributes` to `extraProperties` (for `/archives` endpoints) - Add `uriTemplate` for your custom endpoints (for `/archives` endpoints) - Prefix all named operations with `api_` to avoid conflict with non API routes - All filters and extensions use new interfaces - Removed all deprecated DataTransformer and Dto classes - Once everything is migrated changed `metadata_backward_compatibility_layer: false` in `config/packages/api_platform.yaml`
- Loading branch information
1 parent
1ef33a8
commit f0317aa
Showing
122 changed files
with
1,233 additions
and
2,430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
--- | ||
RZ\Roadiz\CoreBundle\Entity\AttributeValue: | ||
collectionOperations: | ||
get: | ||
operations: | ||
ApiPlatform\Metadata\GetCollection: | ||
method: "GET" | ||
normalization_context: | ||
normalizationContext: | ||
groups: ["urls", "attribute", "document_display", "attribute_node", "attribute_documents"] | ||
enable_max_depth: true | ||
itemOperations: | ||
get: | ||
ApiPlatform\Metadata\Get: | ||
method: 'GET' | ||
normalization_context: | ||
normalizationContext: | ||
groups: ["urls", "attribute", "document_display", "attribute_node", "attribute_documents"] | ||
enable_max_depth: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
--- | ||
RZ\Roadiz\CoreBundle\Entity\Document: | ||
collectionOperations: | ||
get: | ||
operations: | ||
ApiPlatform\Metadata\GetCollection: | ||
method: "GET" | ||
normalization_context: | ||
normalizationContext: | ||
groups: ["urls", "document_display", "document_folders", "document_folders_all", "document_display_sources"] | ||
enable_max_depth: true | ||
itemOperations: | ||
get: | ||
|
||
ApiPlatform\Metadata\Get: | ||
method: 'GET' | ||
normalization_context: | ||
normalizationContext: | ||
groups: ["urls", "document", "document_display", "document_folders", "document_folders_all", "document_display_sources"] | ||
enable_max_depth: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
--- | ||
RZ\Roadiz\CoreBundle\Entity\Folder: | ||
iri: Folder | ||
shortName: Folder | ||
collectionOperations: | ||
get: | ||
operations: | ||
ApiPlatform\Metadata\GetCollection: | ||
method: "GET" | ||
normalization_context: | ||
normalizationContext: | ||
groups: [ "folder" ] | ||
enable_max_depth: true | ||
itemOperations: | ||
get: | ||
ApiPlatform\Metadata\Get: | ||
method: "GET" | ||
normalization_context: | ||
normalizationContext: | ||
groups: [ "folder" ] | ||
enable_max_depth: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
--- | ||
RZ\Roadiz\CoreBundle\Entity\Node: | ||
shortName: Node | ||
collectionOperations: [] | ||
itemOperations: | ||
get: | ||
operations: | ||
ApiPlatform\Metadata\Get: | ||
method: 'GET' | ||
normalization_context: | ||
normalizationContext: | ||
groups: ["node", "document_display"] | ||
enable_max_depth: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.