for json payloads, the convention is to use the singular for array keynames

{
  "path-namespace": [
    {
      "prefix": "ns",
      "namespace-uri": "http://example.com/test";
    }
  ]
}

hth, J

________________________________
From: [email protected] 
<[email protected]> on behalf of Florent Georges 
<[email protected]>
Sent: 21 September 2017 12:44:41
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Management API: JSON payload for "path 
namespaces"

Hi,

I am trying to send an update request for the property "path namespaces" on a 
database (PUT /databases/{name}/properties), using a JSON payload.  The payload 
is:

    { "path-namespaces": [{
        "prefix": "ns",
        "namespace-uri": "http://example.com/";
    }]}

I then get a MANAGE-INVALIDPAYLOAD error:

    Unexpected element: prefix (not in schema)

Any idea what's wrong?

Regards,

--
Florent Georges
H2O Consulting
http://h2o.consulting/


_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to