Commit 50111a6d authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

erp5_api_style: Get actions links are now generated as the other actions

parent 9378f440
......@@ -23,17 +23,12 @@ def populateLinks(jio_type, url, action_list):
"curl-example": 'curl -u user:password %s -H "Content-Type: application/json" --data @input.json' % (base_url + url,)
})
return result_list
data["links"] = data["links"] + [{
"jio_type": "get",
"href": "get/",
"targetSchema": base_url + "get-request-schema.json",
"title": "Get Document",
"method": "POST",
"curl-example": 'curl -u user:password %s -H "Content-Type: application/json" --data @input.json' % (base_url + "get/",)
}]
data["links"] = data["links"] + populateLinks("get", "get/", context.ERP5Site_getAllActionListForAPIGet())
data["links"] = data["links"] + populateLinks("post", "post/", context.ERP5Site_getAllActionListForAPIPost())
data["links"] = data["links"] + populateLinks("put", "put/", context.ERP5Site_getAllActionListForAPIPut())
data["links"] = data["links"] + populateLinks("allDocs", "allDocs/", context.ERP5Site_getAllActionListForAPIAllDocs())
import json
return json.dumps(
data,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment