[verify after deploy] Fix API endpoint docs.

After deploying to both staging and prod, double check the docs
are correct here.  This fixes the API docs on prod, which had
"POST /api/v1/messages", despite "/api" not being part of the
prod path.  Prod docs are here:

https://zulip.com/api/endpoints/

(imported from commit a2c4d316128f88171f4a76074314be64d9bc9728)
This commit is contained in:
Steve Howell 2014-01-03 12:37:37 -05:00
parent 4900ac4b20
commit 12b921c9a3
2 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,7 @@
[
{
"method": "POST",
"endpoint": "/api/v1/messages",
"endpoint": "messages",
"example_response": "{'msg': '', 'result': 'success', 'id': 12345678}",
"returns": [
[
@ -35,7 +35,7 @@
},
{
"method": "POST",
"endpoint": "/api/v1/register",
"endpoint": "register",
"example_response": "{'msg': '', 'last_event_id': -1, 'result': 'success', 'queue_id': '1375801870:2942'}",
"returns": [
[
@ -65,7 +65,7 @@
},
{
"method": "GET",
"endpoint": "/api/v1/events",
"endpoint": "events",
"example_response":
"{'result': 'success',
'msg': '',

View File

@ -485,6 +485,7 @@ def api_endpoint_docs(request):
calls = ujson.loads(raw_calls)
langs = set()
for call in calls:
call["endpoint"] = "%s/v1/%s" % (settings.EXTERNAL_API_URI, call["endpoint"])
call["example_request"]["curl"] = call["example_request"]["curl"].replace("https://api.zulip.com", settings.EXTERNAL_API_URI)
response = call['example_response']
if not '\n' in response: