openapi_docs: Replace `argument` with `parameter`.

The term `parameter` is a better word than `argument` for data passed
to an API endpoint; this is why OpenAPI uses in their terminology.
Replace `argument` with `parameter` in the API docs to improve their
readability.

Fixes #15435.
This commit is contained in:
orientor 2020-06-18 19:05:25 +05:30 committed by Tim Abbott
parent d4fc28cf42
commit 817ee5c6b2
53 changed files with 79 additions and 79 deletions

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/messages/{message_id}/reactions:post}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/realm/filters:post}

View File

@ -32,7 +32,7 @@ zulip(config).then((client) => {
client.users.me.subscriptions.add(meParams).then(console.log);
// To subscribe another user to a stream, you may pass in
// the `principals` argument, like so:
// the `principals` parameter, like so:
const anotherUserParams = {
subscriptions: JSON.stringify([
{'name': 'Verona'},
@ -49,13 +49,13 @@ zulip(config).then((client) => {
{generate_code_example(curl, include=["subscriptions"])|/users/me/subscriptions:post|example}
To subscribe another user to a stream, you may pass in
the `principals` argument, like so:
the `principals` parameter, like so:
{generate_code_example(curl, include=["subscriptions", "principals"])|/users/me/subscriptions:post|example}
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/users/me/subscriptions:post}

View File

@ -3,5 +3,5 @@
You can create a stream using Zulip's REST API by submitting a
[subscribe](/api/add-subscriptions) request with a stream name that
doesn't yet exist. You can specify the initial configuration of the
stream using the `invite_only` and `announce` arguments to that
stream using the `invite_only` and `announce` parameters to that
request.

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/user_groups/create:post}

View File

@ -23,7 +23,7 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/users:post}

View File

@ -17,7 +17,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/users/{user_id}:delete}

View File

@ -17,7 +17,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/messages/{message_id}:delete}

View File

@ -43,7 +43,7 @@ zulip(config).then((client) => {
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/events:delete}

View File

@ -15,9 +15,9 @@
{end_tabs}
## Arguments
## Parameters
**Note**: The following arguments are all URL query parameters.
**Note**: The following parameters are all URL query parameters.
{generate_api_arguments_table|zulip.yaml|/streams/{stream_id}:delete}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/user_groups/{group_id}:delete}

View File

@ -11,7 +11,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/dev_fetch_api_key:post}

View File

@ -38,9 +38,9 @@ as URL query parameters, like so:
{end_tabs}
## Arguments
## Parameters
**Note**: The following arguments are all URL query parameters.
**Note**: The following parameters are all URL query parameters.
{generate_api_arguments_table|zulip.yaml|/streams:get}

View File

@ -41,9 +41,9 @@ You may pass the `client_gravatar` query parameter as follows:
{end_tabs}
## Arguments
## Parameters
**Note**: The following arguments are all URL query parameters.
**Note**: The following parameters are all URL query parameters.
{generate_api_arguments_table|zulip.yaml|/users:get}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/attachments:get}

View File

@ -18,7 +18,7 @@ client = zulip.Client(config_file="~/zuliprc")
# If you already have a queue registered and thus, have a queue_id
# on hand, you may use client.get_events() and pass in the above
# arguments, like so:
# parameters, like so:
print(client.get_events(
queue_id="1515010080:4",
last_event_id=-1
@ -63,13 +63,13 @@ zulip(config).then((client) => {
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/events:get}
**Note**: The arguments documented above are optional in the sense that
**Note**: The parameters documented above are optional in the sense that
even if you haven't registered a queue by explicitly requesting the
`{{ api_url}}/v1/register` endpoint, you could pass the arguments for
`{{ api_url}}/v1/register` endpoint, you could pass the parameters for
[the `{{ api_url}}/v1/register` endpoint](/api/register-queue) to this
endpoint and a queue would be registered in the absence of a `queue_id`.

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/messages/{message_id}/history:get}

View File

@ -40,7 +40,7 @@ zulip(config).then((client) => {
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/messages:get}

View File

@ -31,7 +31,7 @@ zulip(config).then((client) => {
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/realm/emoji:get}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/users/{email}/presence:get}

View File

@ -33,9 +33,9 @@ zulip(config).then((client) => {
{end_tabs}
## Arguments
## Parameters
This endpoint takes no arguments.
This endpoint takes no parameters.
## Response

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/messages/{message_id}:get}

View File

@ -32,9 +32,9 @@ zulip(config).then((client) => {
{end_tabs}
## Arguments
## Parameters
**Note**: The following arguments are all URL query parameters.
**Note**: The following parameters are all URL query parameters.
{generate_api_arguments_table|zulip.yaml|/get_stream_id:get}

View File

@ -33,7 +33,7 @@ zulip(config).then((client) => {
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/users/me/{stream_id}/topics:get}

View File

@ -38,7 +38,7 @@ You may pass the `include_subscribers` query parameter as follows:
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/users/me/subscriptions:get}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/users/{user_id}/subscriptions/{stream_id}:get}

View File

@ -17,7 +17,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/user_groups:get}

View File

@ -19,9 +19,9 @@ You may pass the `client_gravatar` or `include_custom_profile_fields` query para
{end_tabs}
## Arguments
## Parameters
**Note**: The following arguments are all URL query parameters.
**Note**: The following parameters are all URL query parameters.
{generate_api_arguments_table|zulip.yaml|/users/{user_id}:get}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/realm/filters:get}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/mark_all_as_read:post}
@ -47,7 +47,7 @@ Mark all the unread messages in a stream as read.
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/mark_stream_as_read:post}
@ -79,7 +79,7 @@ Mark all the unread messages in a topic as read.
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/mark_topic_as_read:post}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/users/me/subscriptions/muted_topics:patch}

View File

@ -18,7 +18,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/users/{user_id}/reactivate:post}

View File

@ -13,7 +13,7 @@ The simplest way to use Zulip's real-time events API is by using
`call_on_each_event` from our Python bindings. You just need to write
a Python function (in the examples below, the `lambda`s) and pass it
into `call_on_each_event`; your function will be called whenever a new
event matching the specific `event_type` and/or `narrow` arguments
event matching the specific `event_type` and/or `narrow` parameters
occurs in Zulip.
`call_on_each_event` takes care of all the potentially tricky details
@ -50,7 +50,7 @@ client.call_on_each_event(lambda event: sys.stdout.write(str(event) + "\n"))
{end_tabs}
## Arguments
## Parameters
You may also pass in the following keyword arguments to `call_on_each_event`:

View File

@ -32,7 +32,7 @@ browser reloading the Zulip webapp when your laptop comes back online
after being offline for more than 10 minutes).
When prototyping with this API, we recommend first calling `register`
with no `event_types` argument to see all the available data from all
with no `event_types` parameter to see all the available data from all
supported event types. Before using your client in production, you
should set appropriate `event_types` and `fetch_event_types` filters
so that your client only requests the data it needs. A few minutes
@ -79,7 +79,7 @@ zulip(config).then((client) => {
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/register:post}

View File

@ -16,7 +16,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/messages/{message_id}/reactions:delete}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/realm/filters/{filter_id}:delete}

View File

@ -40,7 +40,7 @@ zulip(config).then((client) => {
{generate_code_example(curl, include=["subscriptions"])|/users/me/subscriptions:delete|example}
You may specify the `principals` argument like so:
You may specify the `principals` parameter like so:
{generate_code_example(curl)|/users/me/subscriptions:delete|example}
@ -49,7 +49,7 @@ administrative privileges.
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/users/me/subscriptions:delete}

View File

@ -36,7 +36,7 @@ zulip(config).then((client) => {
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/messages/render:post}

View File

@ -23,9 +23,9 @@ A typical failed JSON response for when the API key is invalid:
{generate_code_example|/rest-error-handling:post|fixture(400_0)}
## Missing request argument(s)
## Missing request parameter(s)
A typical failed JSON response for when a required request argument
A typical failed JSON response for when a required request parameter
is not supplied:
{generate_code_example|/rest-error-handling:post|fixture(400_1)}

View File

@ -62,12 +62,12 @@ zulip-send --stream Denmark --subject Castle \
--user othello-bot@example.com --api-key a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5
```
You can omit the `user` and `api-key` arguments if you have a `~/.zuliprc`
You can omit the `user` and `api-key` parameters if you have a `~/.zuliprc`
file.
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/messages:post}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/server_settings:get}

View File

@ -40,7 +40,7 @@ zulip(config).then((client) => {
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/typing:post}

View File

@ -42,7 +42,7 @@ zulip(config).then((client) => {
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/messages/flags:post}

View File

@ -45,7 +45,7 @@ You only have permission to edit a message if:
2. This is a topic-only edit for a (no topic) message, **OR**:
3. This is a topic-only edit and you are an admin.
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/messages/{message_id}:patch}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/settings/notifications:patch}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/streams/{stream_id}:patch}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/users/me/subscriptions/properties:post}

View File

@ -15,7 +15,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/user_groups/{group_id}:patch}

View File

@ -17,7 +17,7 @@
{end_tabs}
## Arguments
## Parameters
{generate_api_arguments_table|zulip.yaml|/users/{user_id}:patch}

View File

@ -17,7 +17,7 @@
{end_tabs}
## Arguments
## Parameters
As described above, the image file to upload must be provided in the
request's body.

View File

@ -16,7 +16,7 @@
{end_tabs}
## Arguments
## Parameters
As described above, the file to upload must be provided in the
request's body.

View File

@ -2426,7 +2426,7 @@ paths:
If any of the specified streams do not exist, they are automatically
created, and configured using the `invite_only` setting specified in
the arguments (see below).
the parameters (see below).
parameters:
- name: subscriptions
in: query
@ -2438,7 +2438,7 @@ paths:
appropriate value.
**Note**: This argument is called `streams` and not `subscriptions`
**Note**: This parameter is called `streams` and not `subscriptions`
in our Python API."
schema:
type: array
@ -2661,7 +2661,7 @@ paths:
- name: subscriptions
in: query
description: |
A list of stream names to unsubscribe from. This argument is called
A list of stream names to unsubscribe from. This parameter is called
`streams` in our Python API.
schema:
type: array
@ -3210,10 +3210,10 @@ paths:
- name: fetch_event_types
in: query
description: |
Same as the `event_types` argument except that the values in
Same as the `event_types` parameter except that the values in
`fetch_event_types` are used to fetch initial data. If
`fetch_event_types` is not provided, `event_types` is used and if
`event_types` is not provided, this argument defaults to `None`.
`event_types` is not provided, this parameter defaults to `None`.
schema:
type: array
items:
@ -4276,7 +4276,7 @@ paths:
}
/real-time:
# This entry is a hack; it exists to give us a place to put the text
# documenting the arguments for call_on_each_event and friends.
# documenting the parameters for call_on_each_event and friends.
post:
tags: ["real_time_events"]
description: |
@ -4676,7 +4676,7 @@ components:
var_name:
type: string
description: |
It contains the information about the missing argument.
It contains the information about the missing parameter.
- example:
{
"code": "REQUEST_VARIABLE_MISSING",
@ -4721,7 +4721,7 @@ components:
* **realm_user** (changes to users in the organization and
their properties, such as their name).
If you do not specify this argument, you will receive all
If you do not specify this parameter, you will receive all
events, and have to filter out the events not relevant to
your client in your client code. For most applications, one
is only interested in messages, so one specifies:
@ -4928,7 +4928,7 @@ components:
description: |
A list of user ids (preferred) or Zulip display email
addresses of the users to be subscribed to or unsubscribed
from the streams specified in the `subscriptions` argument. If
from the streams specified in the `subscriptions` parameter. If
not provided, then the requesting user/bot is subscribed.
**Changes**: The integer format is new in Zulip 2.2 (Feature level 9).

View File

@ -120,7 +120,7 @@ class DocPageTest(ZulipTestCase):
self._test('/api/get-events-from-queue', 'dont_block')
self._test('/api/delete-queue', 'Delete a previously registered queue')
self._test('/api/update-message', 'propagate_mode')
self._test('/api/get-profile', 'takes no arguments')
self._test('/api/get-profile', 'takes no parameters')
self._test('/api/add-subscriptions', 'authorization_errors_fatal')
self._test('/api/create-user', 'zuliprc-admin')
self._test('/api/remove-subscriptions', 'not_removed')