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

The OPTIONS REST routes are not loaded anymore

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.1.0
    • 2.1.0-beta1
    • Platform > REST API v2
    • 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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: