mirror of https://github.com/zulip/zulip.git
docs: Fix indentation in lines started with a hyphen.
This commit is contained in:
parent
1fc1cafd6f
commit
90301a4d93
|
@ -23,12 +23,12 @@ info:
|
|||
# The base configuration for this API
|
||||
basePath: /api/v1
|
||||
schemes:
|
||||
- http
|
||||
- https
|
||||
- http
|
||||
- https
|
||||
consumes:
|
||||
- application/x-www-form-urlencoded
|
||||
- application/x-www-form-urlencoded
|
||||
produces:
|
||||
- application/json
|
||||
- application/json
|
||||
|
||||
######################
|
||||
# Endpoint definitions
|
||||
|
@ -40,33 +40,33 @@ paths:
|
|||
description: Send a message
|
||||
operationId: addMessage
|
||||
parameters:
|
||||
- name: type
|
||||
in: formData
|
||||
description: One of {`private`, `stream`}
|
||||
required: true
|
||||
type: string
|
||||
- name: content
|
||||
in: formData
|
||||
description: The content of the message. Maximum message size of 10000 bytes.
|
||||
required: true
|
||||
type: string
|
||||
- name: to
|
||||
in: formData
|
||||
description: |
|
||||
In the case of a stream message, a string identifying the
|
||||
stream. In the case of a private message, a JSON-encoded
|
||||
list containing the usernames of the recipients.
|
||||
required: true
|
||||
type: string
|
||||
- name: subject
|
||||
in: formData
|
||||
description: |
|
||||
The topic for the message (Only required if type is `stream`).
|
||||
Maximum length of 60 characters.
|
||||
required: false
|
||||
type: string
|
||||
- name: type
|
||||
in: formData
|
||||
description: One of {`private`, `stream`}
|
||||
required: true
|
||||
type: string
|
||||
- name: content
|
||||
in: formData
|
||||
description: The content of the message. Maximum message size of 10000 bytes.
|
||||
required: true
|
||||
type: string
|
||||
- name: to
|
||||
in: formData
|
||||
description: |
|
||||
In the case of a stream message, a string identifying the
|
||||
stream. In the case of a private message, a JSON-encoded
|
||||
list containing the usernames of the recipients.
|
||||
required: true
|
||||
type: string
|
||||
- name: subject
|
||||
in: formData
|
||||
description: |
|
||||
The topic for the message (Only required if type is `stream`).
|
||||
Maximum length of 60 characters.
|
||||
required: false
|
||||
type: string
|
||||
security:
|
||||
- basicAuth: []
|
||||
- basicAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: |
|
||||
|
@ -83,39 +83,39 @@ paths:
|
|||
description: Register a queue to receive new messages
|
||||
operationId: registerQueue
|
||||
parameters:
|
||||
- name: event_types
|
||||
in: formData
|
||||
description: |
|
||||
A JSON-encoded array indicating which types of
|
||||
events you're interested in. Values that you might find
|
||||
useful include:
|
||||
- name: event_types
|
||||
in: formData
|
||||
description: |
|
||||
A JSON-encoded array indicating which types of
|
||||
events you're interested in. Values that you might find
|
||||
useful include:
|
||||
|
||||
`message` (messages),
|
||||
`message` (messages),
|
||||
|
||||
`subscriptions` (changes in your subscriptions),
|
||||
`subscriptions` (changes in your subscriptions),
|
||||
|
||||
`realm_user` (changes in the list of users in your realm), and
|
||||
`realm_user` (changes in the list of users in your realm), and
|
||||
|
||||
`pointer` (changes in your pointer).
|
||||
`pointer` (changes in your pointer).
|
||||
|
||||
If you do not specify this argument, 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:
|
||||
`event_types=["message"]`
|
||||
If you do not specify this argument, 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:
|
||||
`event_types=["message"]`
|
||||
|
||||
required: false
|
||||
type: string
|
||||
- name: apply_markdown
|
||||
in: formData
|
||||
description: |
|
||||
Set to `true` if you would like the content to
|
||||
be rendered in HTML format (by default, the API returns the
|
||||
raw text that the user entered.)
|
||||
required: false
|
||||
type: string
|
||||
required: false
|
||||
type: string
|
||||
- name: apply_markdown
|
||||
in: formData
|
||||
description: |
|
||||
Set to `true` if you would like the content to
|
||||
be rendered in HTML format (by default, the API returns the
|
||||
raw text that the user entered.)
|
||||
required: false
|
||||
type: string
|
||||
security:
|
||||
- basicAuth: []
|
||||
- basicAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: |
|
||||
|
@ -222,32 +222,32 @@ paths:
|
|||
description: Get new events from an events queue
|
||||
operationId: getEvents
|
||||
parameters:
|
||||
- name: queue_id
|
||||
in: query
|
||||
description: The ID of a queue that you registered via `POST /api/v1/register`.
|
||||
required: true
|
||||
type: string
|
||||
- name: last_event_id
|
||||
in: query
|
||||
description: |
|
||||
The highest event ID in this queue that you've received and
|
||||
wish to acknowledge. See the code for `call_on_each_event` in
|
||||
the zulip Python module for an example implementation of
|
||||
correctly processing each event exactly once.
|
||||
required: true
|
||||
type: string
|
||||
- name: dont_block
|
||||
in: query
|
||||
description: |
|
||||
Set to `true` if the client is requesting a
|
||||
nonblocking reply. If not specified, the request will block
|
||||
until either a new event is available or a few minutes have
|
||||
passed, in which case the server will send the client a
|
||||
heartbeat event.
|
||||
required: false
|
||||
type: string
|
||||
- name: queue_id
|
||||
in: query
|
||||
description: The ID of a queue that you registered via `POST /api/v1/register`.
|
||||
required: true
|
||||
type: string
|
||||
- name: last_event_id
|
||||
in: query
|
||||
description: |
|
||||
The highest event ID in this queue that you've received and
|
||||
wish to acknowledge. See the code for `call_on_each_event` in
|
||||
the zulip Python module for an example implementation of
|
||||
correctly processing each event exactly once.
|
||||
required: true
|
||||
type: string
|
||||
- name: dont_block
|
||||
in: query
|
||||
description: |
|
||||
Set to `true` if the client is requesting a
|
||||
nonblocking reply. If not specified, the request will block
|
||||
until either a new event is available or a few minutes have
|
||||
passed, in which case the server will send the client a
|
||||
heartbeat event.
|
||||
required: false
|
||||
type: string
|
||||
security:
|
||||
- basicAuth: []
|
||||
- basicAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: |
|
||||
|
@ -264,22 +264,22 @@ paths:
|
|||
description: Get presence data for another user.
|
||||
operationId: getPresence
|
||||
parameters:
|
||||
- name: user
|
||||
in: path
|
||||
description: Enter email address
|
||||
required: true
|
||||
type: string
|
||||
- name: user
|
||||
in: path
|
||||
description: Enter email address
|
||||
required: true
|
||||
type: string
|
||||
security:
|
||||
- basicAuth: []
|
||||
- basicAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: The response from a successful call
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- msg
|
||||
- result
|
||||
- presence
|
||||
- msg
|
||||
- result
|
||||
- presence
|
||||
properties:
|
||||
msg:
|
||||
type: string
|
||||
|
@ -292,24 +292,24 @@ paths:
|
|||
description: Upload a file, and print the corresponding URI.
|
||||
operationId: userUploads
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
- multipart/form-data
|
||||
parameters:
|
||||
- name: file
|
||||
in: formData
|
||||
description: File to be uploaded
|
||||
type: file
|
||||
required: true
|
||||
- name: file
|
||||
in: formData
|
||||
description: File to be uploaded
|
||||
type: file
|
||||
required: true
|
||||
security:
|
||||
- basicAuth: []
|
||||
- basicAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- msg
|
||||
- result
|
||||
- uri
|
||||
- msg
|
||||
- result
|
||||
- uri
|
||||
properties:
|
||||
msg:
|
||||
type: string
|
||||
|
@ -322,22 +322,22 @@ paths:
|
|||
get:
|
||||
description: Retrieve the content of a message.
|
||||
parameters:
|
||||
- name: message_id
|
||||
in: path
|
||||
description: ID of the message to be retrieved.
|
||||
type: integer
|
||||
required: true
|
||||
- name: message_id
|
||||
in: path
|
||||
description: ID of the message to be retrieved.
|
||||
type: integer
|
||||
required: true
|
||||
security:
|
||||
- basicAuth: []
|
||||
- basicAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success.
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- msg
|
||||
- result
|
||||
- raw_content
|
||||
- msg
|
||||
- result
|
||||
- raw_content
|
||||
properties:
|
||||
msg:
|
||||
type: string
|
||||
|
@ -349,26 +349,26 @@ paths:
|
|||
patch:
|
||||
description: Edit a message that has already been sent.
|
||||
parameters:
|
||||
- name: message_id
|
||||
in: path
|
||||
description: ID of the message to be edited.
|
||||
type: integer
|
||||
required: true
|
||||
- name: subject
|
||||
in: query
|
||||
description: Message's topic.
|
||||
type: string
|
||||
- name: propagate_mode
|
||||
in: query
|
||||
description: propagation mode
|
||||
type: string
|
||||
default: "change_one"
|
||||
- name: content
|
||||
in: query
|
||||
description: Message's body.
|
||||
type: string
|
||||
- name: message_id
|
||||
in: path
|
||||
description: ID of the message to be edited.
|
||||
type: integer
|
||||
required: true
|
||||
- name: subject
|
||||
in: query
|
||||
description: Message's topic.
|
||||
type: string
|
||||
- name: propagate_mode
|
||||
in: query
|
||||
description: propagation mode
|
||||
type: string
|
||||
default: "change_one"
|
||||
- name: content
|
||||
in: query
|
||||
description: Message's body.
|
||||
type: string
|
||||
security:
|
||||
- basicAuth: []
|
||||
- basicAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
|
@ -382,11 +382,11 @@ paths:
|
|||
msg:
|
||||
type: string
|
||||
enum:
|
||||
- Your organization has turned off message editing
|
||||
- You don't have permission to edit this message
|
||||
- The time limit for editing this message has past
|
||||
- Nothing to change
|
||||
- Topic can't be empty
|
||||
- Your organization has turned off message editing
|
||||
- You don't have permission to edit this message
|
||||
- The time limit for editing this message has past
|
||||
- Nothing to change
|
||||
- Topic can't be empty
|
||||
result:
|
||||
type: string
|
||||
|
||||
|
@ -408,8 +408,8 @@ definitions:
|
|||
JsonResponse:
|
||||
type: object
|
||||
required:
|
||||
- msg
|
||||
- result
|
||||
- msg
|
||||
- result
|
||||
properties:
|
||||
msg:
|
||||
type: string
|
||||
|
@ -418,14 +418,14 @@ definitions:
|
|||
|
||||
JsonSuccess:
|
||||
allOf:
|
||||
- $ref: '#/definitions/JsonResponse'
|
||||
- $ref: '#/definitions/JsonResponse'
|
||||
properties:
|
||||
msg:
|
||||
default: success
|
||||
|
||||
JsonError:
|
||||
allOf:
|
||||
- $ref: '#/definitions/JsonResponse'
|
||||
- $ref: '#/definitions/JsonResponse'
|
||||
properties:
|
||||
msg:
|
||||
default: error
|
||||
|
@ -434,9 +434,9 @@ definitions:
|
|||
MessageResponse:
|
||||
type: object
|
||||
required:
|
||||
- msg
|
||||
- result
|
||||
- id
|
||||
- msg
|
||||
- result
|
||||
- id
|
||||
properties:
|
||||
msg:
|
||||
type: string
|
||||
|
@ -450,10 +450,10 @@ definitions:
|
|||
RegisterResponse:
|
||||
type: object
|
||||
required:
|
||||
- msg
|
||||
- result
|
||||
- queue_id
|
||||
- last_event_id
|
||||
- msg
|
||||
- result
|
||||
- queue_id
|
||||
- last_event_id
|
||||
properties:
|
||||
msg:
|
||||
type: string
|
||||
|
@ -575,10 +575,10 @@ definitions:
|
|||
stream:
|
||||
type: object
|
||||
required:
|
||||
- stream_id
|
||||
- description
|
||||
- name
|
||||
- invite_only
|
||||
- stream_id
|
||||
- description
|
||||
- name
|
||||
- invite_only
|
||||
properties:
|
||||
stream_id:
|
||||
type: integer
|
||||
|
@ -593,11 +593,11 @@ definitions:
|
|||
user:
|
||||
type: object
|
||||
required:
|
||||
- is_admin
|
||||
- user_id
|
||||
- email
|
||||
- full_name
|
||||
- is_bot
|
||||
- is_admin
|
||||
- user_id
|
||||
- email
|
||||
- full_name
|
||||
- is_bot
|
||||
properties:
|
||||
is_admin:
|
||||
type: boolean
|
||||
|
@ -615,9 +615,9 @@ definitions:
|
|||
EventsResponse:
|
||||
type: object
|
||||
required:
|
||||
- msg
|
||||
- result
|
||||
- events
|
||||
- msg
|
||||
- result
|
||||
- events
|
||||
properties:
|
||||
msg:
|
||||
type: string
|
||||
|
@ -634,8 +634,8 @@ definitions:
|
|||
event:
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- id
|
||||
- type
|
||||
- id
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
|
|
Loading…
Reference in New Issue