Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22596

Refactor REST input dispatching/parsing

    XMLWordPrintable

Details

    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 )
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            bertrand.dunogier@ibexa.co Bertrand Dunogier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: