Details
-
Story
-
Resolution: Unresolved
-
High
-
5.0, 5.1, 5.2, 5.3, 1.6.0
Description
Any REST controller action that expects a value object from the request's payload will explicitely parse it: https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/REST/Server/Controller/Content.php#L115-120.
This could be made much more simple by making this part of the request's pre-processing, and directly provide a typed value object as an action argument:
class Content extends RestController { /** * Updates a content's metadata * * @param mixed $contentId * @param ContentMetadataUpdateStruct $contentId * @return \eZ\Publish\Core\REST\Server\Values\RestContent */ public function updateContentMetadata( $contentId, ContentMetadataUpdateStruct $updateStruct )