mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 02:17:19 +00:00
docs: Make update-stream use curl example system.
new_name and description params should be valid JSON strings. The format of these params are marked as json so that the curl example genenrator can convert them into json strings.
This commit is contained in:
@@ -140,6 +140,8 @@ cURL example.""".format(endpoint, method, param_name)
|
||||
example_value = param.get("example", DEFAULT_EXAMPLE[param["schema"]["type"]])
|
||||
if type(example_value) == bool:
|
||||
example_value = str(example_value).lower()
|
||||
if param["schema"].get("format", "") == "json":
|
||||
example_value = json.dumps(example_value)
|
||||
if curl_argument:
|
||||
return " -d '{}={}'".format(param_name, example_value)
|
||||
return example_value
|
||||
|
||||
Reference in New Issue
Block a user