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

The OPTIONS REST routes are not loaded anymore

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.0-beta1
    • Fix Version/s: 2.1.0
    • Component/s: Platform > REST API v2
    • Labels:
      None

      Description

      The route loader that defines the REST routes for the OPTIONS verb are not loaded anymore. The entry in app/config/routing.yml has been removed: they exist in v1.7.7, but not in v2.1.0-beta1, nor in v2.0.0.

      In addition, there seems to be an issue with the routes that are defined. The controller's service is named ezpublish_rest.controller.options the RouteLoader's mapper adds an _ for some reason. Removing it fixes the issue.

      QA

      Automated tests should be added for this OPTIONS method. We don't need to test all of them, but ensuring that a representative example works would be an improvement.

      The response to curl -X OPTIONS -v http://localhost:8000/api/ezp/v2/content/locations/1/2 should include an Allow header with the value GET,PATCH,DELETE,COPY,MOVE,SWAP.

      On the long term, calling OPTIONS on every route we define would ensure that documented/specified routes do allow that method, as the allowed methods are obtained from the registered routes.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              bertrand.dunogier@ez.no Bertrand Dunogier
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: