Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-141

properties endpoint throws 400 for every PUT request

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 2.0
    • services
    • None
    • Yes

      Using the PUT for properties endpoint never works as the value array is always empty on the server side.

      Take the example:

      curl http://localhost:8080/magnoliaAuthor/.rest/properties/v1/website/travel \
        -H "Content-Type: application/json" \
        -X PUT -i \
        --user superuser:superuser \
        --data \
      '{
        "name": "windowTitle",
        "value": [
          "Magnolia CMS - Travel Home"
        ]
      }'
      

      When I debug the call I see that the bad request comes from:

      if (!multiple && valueStrings.size() != 1) {
          return Response.status(Response.Status.BAD_REQUEST).build();
      }
      

      valueStrings is always of size 0.

        Acceptance criteria

              Unassigned Unassigned
              rgange Richard Gange
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:

                  Bug DoR
                  Task DoD