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

properties endpoint throws 400 for every PUT request

    XMLWordPrintable

Details

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

    Description

      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.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:

                  Checklists

                    Bug DoR
                    Task DoD