mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
api-docs: Update mute/unmute user error documentation for 'code' fields.
This commit is contained in:
committed by
Tim Abbott
parent
c4d4dfda4d
commit
28a2893a41
@@ -9160,19 +9160,34 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
oneOf:
|
oneOf:
|
||||||
- allOf:
|
- allOf:
|
||||||
- $ref: "#/components/schemas/JsonError"
|
- $ref: "#/components/schemas/CodedError"
|
||||||
- example: {"msg": "Cannot mute self", "result": "error"}
|
- example:
|
||||||
|
{
|
||||||
|
"code": "BAD_REQUEST",
|
||||||
|
"msg": "Cannot mute self",
|
||||||
|
"result": "error",
|
||||||
|
}
|
||||||
description: |
|
description: |
|
||||||
An example JSON response for when the user is yourself:
|
An example JSON response for when the user ID is the current
|
||||||
|
user's ID:
|
||||||
- allOf:
|
- allOf:
|
||||||
- $ref: "#/components/schemas/JsonError"
|
- $ref: "#/components/schemas/CodedError"
|
||||||
- example: {"msg": "No such user", "result": "error"}
|
- example:
|
||||||
|
{
|
||||||
|
"code": "BAD_REQUEST",
|
||||||
|
"msg": "No such user",
|
||||||
|
"result": "error",
|
||||||
|
}
|
||||||
description: |
|
description: |
|
||||||
An example JSON response for when the user is nonexistent or inaccessible:
|
An example JSON response for when the user is nonexistent or inaccessible:
|
||||||
- allOf:
|
- allOf:
|
||||||
- $ref: "#/components/schemas/JsonError"
|
- $ref: "#/components/schemas/CodedError"
|
||||||
- example:
|
- example:
|
||||||
{"msg": "User already muted", "result": "error"}
|
{
|
||||||
|
"code": "BAD_REQUEST",
|
||||||
|
"msg": "User already muted",
|
||||||
|
"result": "error",
|
||||||
|
}
|
||||||
description: |
|
description: |
|
||||||
An example JSON response for when the user is already muted:
|
An example JSON response for when the user is already muted:
|
||||||
delete:
|
delete:
|
||||||
@@ -9196,13 +9211,23 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
oneOf:
|
oneOf:
|
||||||
- allOf:
|
- allOf:
|
||||||
- $ref: "#/components/schemas/JsonError"
|
- $ref: "#/components/schemas/CodedError"
|
||||||
- example: {"msg": "No such user", "result": "error"}
|
- example:
|
||||||
|
{
|
||||||
|
"code": "BAD_REQUEST",
|
||||||
|
"msg": "No such user",
|
||||||
|
"result": "error",
|
||||||
|
}
|
||||||
description: |
|
description: |
|
||||||
An example JSON response for when the user is nonexistent or inaccessible:
|
An example JSON response for when the user is nonexistent or inaccessible:
|
||||||
- allOf:
|
- allOf:
|
||||||
- $ref: "#/components/schemas/JsonError"
|
- $ref: "#/components/schemas/CodedError"
|
||||||
- example: {"msg": "User is not muted", "result": "error"}
|
- example:
|
||||||
|
{
|
||||||
|
"code": "BAD_REQUEST",
|
||||||
|
"msg": "User is not muted",
|
||||||
|
"result": "error",
|
||||||
|
}
|
||||||
description: |
|
description: |
|
||||||
An example JSON response for when the user is not previously muted:
|
An example JSON response for when the user is not previously muted:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user